mirror of
https://github.com/apache/impala.git
synced 2026-01-06 06:01:03 -05:00
IMPALA-3491: Use unique_database fixture in test_delimited_text.py.
Testing: Ran the test locally 10 times in a loop on exhaustive. Change-Id: Idedd5f03984e41a4b3ebf271e50863e980c66cb6 Reviewed-on: http://gerrit.cloudera.org:8080/3096 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Alex Behm <alex.behm@cloudera.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# fields terminated by '-2' -- thorn character
|
||||
# escaped by '-22' -- lowercase e with circumflex
|
||||
# lines terminated by '\n'
|
||||
select * from text_thorn_ecirc_newline
|
||||
select * from functional.text_thorn_ecirc_newline
|
||||
---- RESULTS
|
||||
'one','two',3,4
|
||||
'one\xfeone','two',3,4
|
||||
@@ -16,7 +16,7 @@ STRING,STRING,INT,INT
|
||||
====
|
||||
---- QUERY
|
||||
# create new tables like the ones above to test inserting
|
||||
create table delim_text_test_db.tecn like text_thorn_ecirc_newline;
|
||||
create table tecn like functional.text_thorn_ecirc_newline;
|
||||
---- RESULTS
|
||||
====
|
||||
---- QUERY
|
||||
@@ -24,12 +24,12 @@ create table delim_text_test_db.tecn like text_thorn_ecirc_newline;
|
||||
# TODO: Expand verification to cover inserting a field terminator and escape character.
|
||||
# Some additional work needs to be done in the test framework to properly encode/decode
|
||||
# the values going into the INSERT query before this will work.
|
||||
insert overwrite delim_text_test_db.tecn values
|
||||
insert overwrite tecn values
|
||||
('abc', 'xyz', 1, 2),
|
||||
('efg', 'xyz', 3, 4)
|
||||
====
|
||||
---- QUERY
|
||||
select * from delim_text_test_db.tecn
|
||||
select * from tecn
|
||||
---- RESULTS
|
||||
'abc','xyz',1,2
|
||||
'efg','xyz',3,4
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# fields terminated by ','
|
||||
# escaped by '\\'
|
||||
# lines terminated by '\n'
|
||||
select * from text_comma_backslash_newline
|
||||
select * from functional.text_comma_backslash_newline
|
||||
---- RESULTS
|
||||
'one','two',3,4
|
||||
'one,one','two',3,4
|
||||
@@ -19,7 +19,7 @@ STRING,STRING,INT,INT
|
||||
# fields terminated by '$'
|
||||
# escaped by '#'
|
||||
# lines terminated by '|'
|
||||
select * from text_dollar_hash_pipe
|
||||
select * from functional.text_dollar_hash_pipe
|
||||
---- RESULTS
|
||||
'one','two',3,4
|
||||
'one$one','two',3,4
|
||||
@@ -31,13 +31,13 @@ STRING,STRING,INT,INT
|
||||
====
|
||||
---- QUERY
|
||||
# create new tables like the ones above to test inserting
|
||||
create table delim_text_test_db.cbn like text_comma_backslash_newline;
|
||||
create table delim_text_test_db.dhp like text_dollar_hash_pipe;
|
||||
create table cbn like functional.text_comma_backslash_newline;
|
||||
create table dhp like functional.text_dollar_hash_pipe;
|
||||
---- RESULTS
|
||||
====
|
||||
---- QUERY
|
||||
# insert data into cbn table and check results
|
||||
insert into delim_text_test_db.cbn values
|
||||
insert into cbn values
|
||||
('abc , abc', 'xyz \\ xyz', 1, 2),
|
||||
('abc ,,, abc', 'xyz \\\\\\ xyz', 3, 4),
|
||||
('abc \\,\\, abc', 'xyz ,\\,\\ xyz', 5, 6)
|
||||
@@ -45,7 +45,7 @@ insert into delim_text_test_db.cbn values
|
||||
: 3
|
||||
====
|
||||
---- QUERY
|
||||
select * from delim_text_test_db.cbn
|
||||
select * from cbn
|
||||
---- RESULTS
|
||||
'abc , abc','xyz \\ xyz',1,2
|
||||
'abc ,,, abc','xyz \\\\\\ xyz',3,4
|
||||
@@ -55,7 +55,7 @@ STRING,STRING,INT,INT
|
||||
====
|
||||
---- QUERY
|
||||
# insert data into dhp table and check results
|
||||
insert into delim_text_test_db.dhp values
|
||||
insert into dhp values
|
||||
('abc $ abc', 'xyz # xyz', 1, 2),
|
||||
('abc $$$ abc', 'xyz ### xyz', 3, 4),
|
||||
('abc #$#$ abc', 'xyz $#$# xyz', 5, 6)
|
||||
@@ -63,7 +63,7 @@ insert into delim_text_test_db.dhp values
|
||||
: 3
|
||||
====
|
||||
---- QUERY
|
||||
select * from delim_text_test_db.dhp
|
||||
select * from dhp
|
||||
---- RESULTS
|
||||
'abc $ abc','xyz # xyz',1,2
|
||||
'abc $$$ abc','xyz ### xyz',3,4
|
||||
|
||||
Reference in New Issue
Block a user