Attila Jeges has uploaded a new patch set (#3). ( 
http://gerrit.cloudera.org:8080/13944 )

Change subject: IMPALA-8198: DATE: Read from avro.
......................................................................

IMPALA-8198: DATE: Read from avro.

This change is a follow-up to IMPALA-7368 and adds support for DATE
type to the avro scanner.

Similarly to parquet, avro uses DATE logical type for dates. DATE
logical type annotates an INT32 that stores the number of days since
the unix epoch, 1 January 1970.

This representation introduces an avro interoperability issue between
Impala and older versions of Hive:
- Before version 3.1, Hive used Julian calendar to represent dates
  up to 1582-10-05 and Gregorian calendar for dates starting with
  1582-10-15. Dates between 1582-10-05 and 1582-10-15 were lost.
- Impala uses proleptic Gregorian calendar, extending the Gregorian
  calendar backward to dates preceding its official introduction in
  1582-10-15.
This means that pre-1582-10-15 dates written to an avro table by Hive
will be read back incorrectly by Impala.

Note that Hive 3.1 switched to proleptic Gregorian calendar too, so
for Hive 3.1+ this is no longer an issue.

Dependency changes:
- BE uses avro 1.7.4-p5 from native-toolchain.

Change-Id: I7a9d5b93a22cf3a00244037e187f8c145cacc959
---
M be/src/codegen/gen_ir_descriptions.py
M be/src/exec/hdfs-avro-scanner-ir.cc
M be/src/exec/hdfs-avro-scanner-test.cc
M be/src/exec/hdfs-avro-scanner.cc
M be/src/exec/hdfs-avro-scanner.h
M be/src/util/avro-util.cc
M common/thrift/generate_error_codes.py
M fe/src/main/java/org/apache/impala/catalog/HdfsFileFormat.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/main/java/org/apache/impala/util/AvroSchemaConverter.java
M fe/src/main/java/org/apache/impala/util/AvroSchemaParser.java
M fe/src/test/java/org/apache/impala/catalog/CatalogObjectToFromThriftTest.java
M testdata/avro_schema_resolution/create_table.sql
M testdata/avro_schema_resolution/file_schema2.avsc
M testdata/avro_schema_resolution/records2.avro
M testdata/avro_schema_resolution/records2.json
M testdata/bad_avro_snap/README
A testdata/bad_avro_snap/hive2_pre_gregorian_date.avro
A testdata/bad_avro_snap/hive3_pre_gregorian_date.avro
A testdata/bad_avro_snap/out_of_range_date.avro
M testdata/bin/generate-schema-statements.py
M testdata/data/README
M testdata/data/date_tbl.avro
A testdata/data/date_tbl.orc
M testdata/datasets/functional/functional_schema_template.sql
M testdata/datasets/functional/schema_constraints.csv
M testdata/workloads/functional-query/queries/DataErrorsTest/avro-errors.test
M testdata/workloads/functional-query/queries/QueryTest/avro-schema-changes.test
M 
testdata/workloads/functional-query/queries/QueryTest/avro-schema-resolution.test
A testdata/workloads/functional-query/queries/QueryTest/avro_date.test
M 
testdata/workloads/functional-query/queries/QueryTest/date-fileformat-support.test
M testdata/workloads/functional-query/queries/QueryTest/date-partitioning.test
M 
testdata/workloads/functional-query/queries/QueryTest/hive2-pre-gregorian-date.test
M testdata/workloads/functional-query/queries/QueryTest/out-of-range-date.test
M tests/query_test/test_date_queries.py
35 files changed, 435 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/44/13944/3
--
To view, visit http://gerrit.cloudera.org:8080/13944
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7a9d5b93a22cf3a00244037e187f8c145cacc959
Gerrit-Change-Number: 13944
Gerrit-PatchSet: 3
Gerrit-Owner: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to