Files
impala/testdata/workloads/functional-query/queries/QueryTest/test-unmatched-schema.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

154 lines
3.9 KiB
Plaintext

# Test case to verify the scanners work properly when the table metadata (specifically the
# number of columns in the table) does not match the number of columns in the data file.
====
---- QUERY
select * from jointbl_test
---- RESULTS
1001,'Name1',94611,5000
1002,'Name2',94611,5000
1003,'Name3',94611,5000
1004,'Name4',94611,5000
1005,'Name5',94611,5000
1106,'Name6',94612,5000
1006,'Name16',94612,5000
1006,'Name6',94616,5000
1106,'Name16',94612,5000
1106,'Name6',94616,5000
1006,'Name16',94616,5000
1106,'Name16',94616,5000
1106,'Name6',94612,15000
1006,'Name16',94612,15000
1006,'Name6',94616,15000
1106,'Name16',94612,15000
1106,'Name6',94616,15000
1006,'Name16',94616,15000
1106,'Name16',94616,15000
---- TYPES
BIGINT, STRING, INT, INT
====
---- QUERY
alter table jointbl_test add columns(new_col string)
---- RESULTS
'New column(s) have been added to the table.'
====
---- QUERY
select * from jointbl_test
---- RESULTS
1001,'Name1',94611,5000,'NULL'
1002,'Name2',94611,5000,'NULL'
1003,'Name3',94611,5000,'NULL'
1004,'Name4',94611,5000,'NULL'
1005,'Name5',94611,5000,'NULL'
1106,'Name6',94612,5000,'NULL'
1006,'Name16',94612,5000,'NULL'
1006,'Name6',94616,5000,'NULL'
1106,'Name16',94612,5000,'NULL'
1106,'Name6',94616,5000,'NULL'
1006,'Name16',94616,5000,'NULL'
1106,'Name16',94616,5000,'NULL'
1106,'Name6',94612,15000,'NULL'
1006,'Name16',94612,15000,'NULL'
1006,'Name6',94616,15000,'NULL'
1106,'Name16',94612,15000,'NULL'
1106,'Name6',94616,15000,'NULL'
1006,'Name16',94616,15000,'NULL'
1106,'Name16',94616,15000,'NULL'
---- TYPES
BIGINT, STRING, INT, INT, STRING
====
---- QUERY
alter table jointbl_test add columns(new_int_col int)
---- RESULTS
'New column(s) have been added to the table.'
====
---- QUERY
select * from jointbl_test
---- RESULTS
1001,'Name1',94611,5000,'NULL',NULL
1002,'Name2',94611,5000,'NULL',NULL
1003,'Name3',94611,5000,'NULL',NULL
1004,'Name4',94611,5000,'NULL',NULL
1005,'Name5',94611,5000,'NULL',NULL
1106,'Name6',94612,5000,'NULL',NULL
1006,'Name16',94612,5000,'NULL',NULL
1006,'Name6',94616,5000,'NULL',NULL
1106,'Name16',94612,5000,'NULL',NULL
1106,'Name6',94616,5000,'NULL',NULL
1006,'Name16',94616,5000,'NULL',NULL
1106,'Name16',94616,5000,'NULL',NULL
1106,'Name6',94612,15000,'NULL',NULL
1006,'Name16',94612,15000,'NULL',NULL
1006,'Name6',94616,15000,'NULL',NULL
1106,'Name16',94612,15000,'NULL',NULL
1106,'Name6',94616,15000,'NULL',NULL
1006,'Name16',94616,15000,'NULL',NULL
1106,'Name16',94616,15000,'NULL',NULL
---- TYPES
BIGINT, STRING, INT, INT, STRING, INT
====
---- QUERY
alter table jointbl_test drop column new_int_col
---- RESULTS
'Column has been dropped.'
====
---- QUERY
select * from jointbl_test
---- RESULTS
1001,'Name1',94611,5000,'NULL'
1002,'Name2',94611,5000,'NULL'
1003,'Name3',94611,5000,'NULL'
1004,'Name4',94611,5000,'NULL'
1005,'Name5',94611,5000,'NULL'
1106,'Name6',94612,5000,'NULL'
1006,'Name16',94612,5000,'NULL'
1006,'Name6',94616,5000,'NULL'
1106,'Name16',94612,5000,'NULL'
1106,'Name6',94616,5000,'NULL'
1006,'Name16',94616,5000,'NULL'
1106,'Name16',94616,5000,'NULL'
1106,'Name6',94612,15000,'NULL'
1006,'Name16',94612,15000,'NULL'
1006,'Name6',94616,15000,'NULL'
1106,'Name16',94612,15000,'NULL'
1106,'Name6',94616,15000,'NULL'
1006,'Name16',94616,15000,'NULL'
1106,'Name16',94616,15000,'NULL'
---- TYPES
BIGINT, STRING, INT, INT, STRING
====
---- QUERY
alter table jointbl_test drop column new_col
---- RESULTS
'Column has been dropped.'
====
---- QUERY
alter table jointbl_test drop column alltypes_id
---- RESULTS
'Column has been dropped.'
====
---- QUERY
select * from jointbl_test
---- RESULTS
1001,'Name1',94611
1002,'Name2',94611
1003,'Name3',94611
1004,'Name4',94611
1005,'Name5',94611
1106,'Name6',94612
1006,'Name16',94612
1006,'Name6',94616
1106,'Name16',94612
1106,'Name6',94616
1006,'Name16',94616
1106,'Name16',94616
1106,'Name6',94612
1006,'Name16',94612
1006,'Name6',94616
1106,'Name16',94612
1106,'Name6',94616
1006,'Name16',94616
1106,'Name16',94616
---- TYPES
BIGINT, STRING, INT
====