Files
impala/testdata/workloads/functional-query/queries/QueryTest/delimited-text.test
Zoltan Borok-Nagy 2ee914d5b3 IMPALA-5903: Inconsistent specification of result set and result set metadata
Before this commit it was quite random which DDL oprations
returned a result set and which didn't.

With this commit, every DDL operations return a summary of
its execution. They declare their result set schema in
Frontend.java, and provide the summary in CalatogOpExecutor.java.

Updated the tests according to the new behavior.

Change-Id: Ic542fb8e49e850052416ac663ee329ee3974e3b9
Reviewed-on: http://gerrit.cloudera.org:8080/9090
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2018-04-11 02:21:48 +00:00

75 lines
1.6 KiB
Plaintext

====
---- QUERY
# test querying text table with:
# fields terminated by ','
# escaped by '\\'
# lines terminated by '\n'
select * from functional.text_comma_backslash_newline
---- RESULTS
'one','two',3,4
'one,one','two',3,4
'one\\','two',3,4
'one\\,one','two',3,4
'one\\\\','two',3,4
---- TYPES
STRING,STRING,INT,INT
====
---- QUERY
# test querying text table with:
# fields terminated by '$'
# escaped by '#'
# lines terminated by '|'
select * from functional.text_dollar_hash_pipe
---- RESULTS
'one','two',3,4
'one$one','two',3,4
'one#','two',3,4
'one#$one','two',3,4
'one##','two',3,4
---- TYPES
STRING,STRING,INT,INT
====
---- QUERY
# create new tables like the ones above to test inserting
create table cbn like functional.text_comma_backslash_newline;
create table dhp like functional.text_dollar_hash_pipe;
---- RESULTS
'Table has been created.'
====
---- QUERY
# insert data into cbn table and check results
insert into cbn values
('abc , abc', 'xyz \\ xyz', 1, 2),
('abc ,,, abc', 'xyz \\\\\\ xyz', 3, 4),
('abc \\,\\, abc', 'xyz ,\\,\\ xyz', 5, 6)
---- RESULTS
: 3
====
---- QUERY
select * from cbn
---- RESULTS
'abc , abc','xyz \\ xyz',1,2
'abc ,,, abc','xyz \\\\\\ xyz',3,4
'abc \\,\\, abc','xyz ,\\,\\ xyz',5,6
---- TYPES
STRING,STRING,INT,INT
====
---- QUERY
# insert data into dhp table and check results
insert into dhp values
('abc $ abc', 'xyz # xyz', 1, 2),
('abc $$$ abc', 'xyz ### xyz', 3, 4),
('abc #$#$ abc', 'xyz $#$# xyz', 5, 6)
---- RESULTS
: 3
====
---- QUERY
select * from dhp
---- RESULTS
'abc $ abc','xyz # xyz',1,2
'abc $$$ abc','xyz ### xyz',3,4
'abc #$#$ abc','xyz $#$# xyz',5,6
---- TYPES
STRING,STRING,INT,INT
====