mirror of
https://github.com/apache/impala.git
synced 2026-01-22 09:01:58 -05:00
With HIVE-22589 Hive3 switched back to using Julian Calendar for historical dates by default which caused an Impala test failure around Avro DATE values. Change-Id: I51dd933867ea7877235e7f6e1f2b56711dca107e Reviewed-on: http://gerrit.cloudera.org:8080/15564 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
166 lines
5.7 KiB
Plaintext
166 lines
5.7 KiB
Plaintext
====
|
|
---- HIVE_MAJOR_VERSION
|
|
2
|
|
---- QUERY
|
|
# TODO: Once DATE type is supported across all fileformats, move this test to
|
|
# hdfs-scan-node.test.
|
|
# Avro table was created by Hive2. Inserting '0001-01-01' to date_col resulted as
|
|
# '0000-12-30' (because Hive2 uses Julian calendar for writing dates before 1582-10-15)
|
|
# which is outside of the supported date range.
|
|
select id_col, date_part, date_col from date_tbl;
|
|
---- RESULTS
|
|
10,1399-06-27,2017-11-28
|
|
11,1399-06-27,NULL
|
|
12,1399-06-27,2018-12-31
|
|
20,2017-11-27,0001-06-19
|
|
21,2017-11-27,0001-06-20
|
|
22,2017-11-27,0001-06-21
|
|
23,2017-11-27,0001-06-22
|
|
24,2017-11-27,0001-06-23
|
|
25,2017-11-27,0001-06-24
|
|
26,2017-11-27,0001-06-25
|
|
27,2017-11-27,0001-06-26
|
|
28,2017-11-27,0001-06-27
|
|
29,2017-11-27,2017-11-28
|
|
30,9999-12-31,9999-12-01
|
|
31,9999-12-31,9999-12-31
|
|
---- TYPES
|
|
INT,DATE,DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 253
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 253. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
3
|
|
---- QUERY
|
|
# Avro table was created by Hive3. Since HIVE-22589 Hive3 also uses Julian calendar for
|
|
# dates before 1582-10-15 by default, therefore we expect the same results as above.
|
|
select id_col, date_part, date_col from date_tbl;
|
|
---- RESULTS
|
|
10,1399-06-27,2017-11-28
|
|
11,1399-06-27,NULL
|
|
12,1399-06-27,2018-12-31
|
|
20,2017-11-27,0001-06-19
|
|
21,2017-11-27,0001-06-20
|
|
22,2017-11-27,0001-06-21
|
|
23,2017-11-27,0001-06-22
|
|
24,2017-11-27,0001-06-23
|
|
25,2017-11-27,0001-06-24
|
|
26,2017-11-27,0001-06-25
|
|
27,2017-11-27,0001-06-26
|
|
28,2017-11-27,0001-06-27
|
|
29,2017-11-27,2017-11-28
|
|
30,9999-12-31,9999-12-01
|
|
31,9999-12-31,9999-12-31
|
|
---- TYPES
|
|
INT,DATE,DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 309
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
2
|
|
---- QUERY
|
|
# Avro table was created by Hive2. Inserting '0001-01-01' to date_col resulted as
|
|
# '0000-12-30' (because Hive2 uses Julian calendar for writing dates before 1582-10-15)
|
|
# which is outside of the supported date range.
|
|
select date_part, count(date_col) from date_tbl group by date_part;
|
|
---- RESULTS
|
|
2017-11-27,10
|
|
1399-06-27,2
|
|
9999-12-31,2
|
|
---- TYPES
|
|
DATE, BIGINT
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 253
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 253. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
3
|
|
---- QUERY
|
|
# Avro table was created by Hive3. Since HIVE-22589 Hive3 also uses Julian calendar for
|
|
# dates before 1582-10-15 by default, therefore we expect the same results as above.
|
|
select date_part, count(date_col) from date_tbl group by date_part;
|
|
---- RESULTS
|
|
2017-11-27,10
|
|
1399-06-27,2
|
|
9999-12-31,2
|
|
---- TYPES
|
|
DATE, BIGINT
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 309
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
2
|
|
---- QUERY
|
|
# Avro table was created by Hive2. Inserting '0001-01-01' to date_col resulted as
|
|
# '0000-12-30' (because Hive2 uses Julian calendar for writing dates before 1582-10-15)
|
|
# which is outside of the supported date range.
|
|
select min(date_part), max(date_part), min(date_col), max(date_col) from date_tbl;
|
|
---- RESULTS
|
|
1399-06-27,9999-12-31,0001-06-19,9999-12-31
|
|
---- TYPES
|
|
DATE, DATE, DATE, DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 253
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 253. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
3
|
|
---- QUERY
|
|
# Avro table was created by Hive3. Since HIVE-22589 Hive3 also uses Julian calendar for
|
|
# dates before 1582-10-15 by default, therefore we expect the same results as above.
|
|
select min(date_part), max(date_part), min(date_col), max(date_col) from date_tbl;
|
|
---- RESULTS
|
|
1399-06-27,9999-12-31,0001-06-19,9999-12-31
|
|
---- TYPES
|
|
DATE, DATE, DATE, DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 309
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
2
|
|
---- QUERY
|
|
# Avro table was created by Hive2. Inserting '0001-01-01' to date_col resulted as
|
|
# '0000-12-30' (because Hive2 uses Julian calendar for writing dates before 1582-10-15)
|
|
# which is outside of the supported date range.
|
|
select date_part, min(date_col), max(date_col) from date_tbl group by date_part;
|
|
---- RESULTS
|
|
2017-11-27,0001-06-19,2017-11-28
|
|
1399-06-27,2017-11-28,2018-12-31
|
|
9999-12-31,9999-12-01,9999-12-31
|
|
---- TYPES
|
|
DATE, DATE, DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 253
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 253. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- HIVE_MAJOR_VERSION
|
|
3
|
|
---- QUERY
|
|
# Avro table was created by Hive3. Since HIVE-22589 Hive3 also uses Julian calendar for
|
|
# dates before 1582-10-15 by default, therefore we expect the same results as above.
|
|
select date_part, min(date_col), max(date_col) from date_tbl group by date_part;
|
|
---- RESULTS
|
|
2017-11-27,0001-06-19,2017-11-28
|
|
1399-06-27,2017-11-28,2018-12-31
|
|
9999-12-31,9999-12-01,9999-12-31
|
|
---- TYPES
|
|
DATE, DATE, DATE
|
|
---- ERRORS
|
|
Problem parsing file __HDFS_FILENAME__ at 309
|
|
Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
|
|
====
|
|
---- QUERY
|
|
select date_part, count(*) from date_tbl group by date_part;
|
|
---- RESULTS
|
|
2017-11-27,10
|
|
1399-06-27,3
|
|
9999-12-31,2
|
|
0001-01-01,7
|
|
---- TYPES
|
|
DATE, BIGINT
|
|
====
|