Files
impala/testdata/workloads/functional-query/queries/QueryTest/avro-schema-resolution.test
Alex Behm 32c40f9c5d Remove redundant test in test_avro_schema_resolution.py
Change-Id: I7123cd5e19d79122af3b4fef2c092442b7a098f1
Reviewed-on: http://gerrit.cloudera.org:8080/3095
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Internal Jenkins
2016-05-31 23:32:11 -07:00

77 lines
1.9 KiB
Plaintext

====
---- QUERY
# see testdata/avro_schema_resolution
select * from schema_resolution_test
---- TYPES
boolean, int, long, float, double, string, string, string
---- RESULTS
true,1,1,1,1,'default string','','NULL'
false,2,2,2,2,'serialized string','','NULL'
====
---- QUERY
# IMPALA-1136: Tests that Impala can read Hive-created Avro tables that have
# no specified Avro schema, i.e., the Avro schema is inferred from the column
# definitions.
# IMPALA-1947: A TIMESTAMP from the column definitions results in a STRING column
# backed by a stored Avro STRING during table loading.
# See testdata/avro_schema_resolution
select * from no_avro_schema where year = 2009 order by id limit 1
union all
select * from no_avro_schema where year = 2010 order by id limit 1
---- TYPES
int, boolean, int, int, int, bigint, float, double, string, string, string, int, int
---- RESULTS: VERIFY_IS_EQUAL_SORTED
2430,true,0,0,0,0,0,0,'09/01/09','0','2009-09-01 00:00:00',2009,9
6380,true,0,0,0,0,0,0,'10/01/10','0','2010-10-01 00:00:00',2010,10
====
---- QUERY
# IMPALA-2798: Test mismatched column definitions and Avro schema.
select count(*) from functional_avro_snap.avro_coldef
---- TYPES
bigint
---- RESULTS
10
====
---- QUERY
# IMPALA-2798: Test mismatched column definitions and Avro schema.
select count(*) from functional_avro_snap.avro_extra_coldef
---- TYPES
bigint
---- RESULTS
10
====
---- QUERY
# IMPALA-2798: Test mismatched column definitions and Avro schema.
select tinyint_col, string_col from functional_avro_snap.avro_coldef order by int_col
---- TYPES
int, string
---- RESULTS
0,'0'
0,'0'
1,'1'
1,'1'
2,'2'
2,'2'
3,'3'
3,'3'
4,'4'
4,'4'
====
---- QUERY
# IMPALA-2798: Test mismatched column definitions and Avro schema.
select tinyint_col, string_col from functional_avro_snap.avro_extra_coldef order by int_col
---- TYPES
int, string
---- RESULTS
0,'0'
0,'0'
1,'1'
1,'1'
2,'2'
2,'2'
3,'3'
3,'3'
4,'4'
4,'4'
====