mirror of
https://github.com/apache/impala.git
synced 2026-01-05 21:00:54 -05:00
Hive allows creating Avro tables without an explicit Avro schema since 0.14.0. For such tables, the Avro schema is inferred from the column definitions, and not stored in the metadata at all (no Avro schema literal or Avro schema file). This patch adds support for loading the metadata of such tables, although Impala currently cannot create such tables (expect a follow-on patch). Change-Id: I9e66921ffbeff7ce6db9619bcfb30278b571cd95 Reviewed-on: http://gerrit.cloudera.org:8080/538 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Internal Jenkins
25 lines
895 B
Plaintext
25 lines
895 B
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
|
|
# 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
|
|
====
|