mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
HIVE-24157 introduces a restriction to prohibit casting DATE/TIMESTAMP types to and from NUMERIC. It's enabled by default and can be turned off by set hive.strict.timestamp.conversion=false. This restriction breaks the data loading on avro_coldef and avro_extra_coldef tables, which results in empty data set and finally fails TestAvroSchemaResolution.test_avro_schema_resolution. This patch explicitly disables the restriction in loading these two avro tables. The Hive version currently used for development does not have HIVE-24157, but upstream Hive does have it. Adding hive.strict.timestamp.conversion does not cause problems for Hive versions that don't have HIVE-24157. Tests: - Run the data loading and test_avro_schema_resolution locally using a Hive that has HIVE-24157. - Run CORE tests - Run data loading with a Hive that doesn't have HIVE-24157. Change-Id: I3e2a47d60d4079fece9c04091258215f3d6a7b52 Reviewed-on: http://gerrit.cloudera.org:8080/21413 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
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.