mirror of
https://github.com/apache/impala.git
synced 2025-12-30 21:02:41 -05:00
Avro tables that were not created with a column-definition list do not have their columns properly populated in the Metastore backend DB (HIVE-6308). For such tables COMPUTE STATS and Hive's ANALYZE TABLE cannot succeed. This patch fails COMPUTE STATS in analysis for such broken Avro tables and adds tests for Avro tables with mismatched a column-definition list and Avro schema. Change-Id: I561ecea944ae2f83d69950b7a1ab9edaa89bdcea Reviewed-on: http://gerrit.ent.cloudera.com:8080/1892 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/1920
This folder contains the files necessary to test Impala support for Avro schema resolution (along with the TestAvroSchemaResolution query test). create_table.sql creates a functional_avro_snap.schema_resolution_test table and loads records1.avro and records2.avro. The .avro files were created via the following commands: java -jar ~/avro-tools-1.7.4.jar fromjson --schema-file file_schema1.avsc --codec snappy records1.json > records1.avro java -jar ~/avro-tools-1.7.4.jar fromjson --schema-file file_schema2.avsc --codec snappy records2.json > records2.avro create_table.sql, file_schema1.avsc and file_schema2.avsc contain the relevant schema definitions.