Files
impala/testdata/workloads/functional-query/queries/QueryTest/out-of-range-date.test
Attila Jeges 684a54a89e IMPALA-7368: Change supported year range for DATE values to 1..9999
Before this patch the supported year range for DATE type started with
year 0. This contradicts the ANSI SQL standard that defines the valid
DATE value range to be 0001-01-01 to 9999-12-31.

Change-Id: Iefdf1c036834763f52d44d0c39a25a1f04e41e07
Reviewed-on: http://gerrit.cloudera.org:8080/14349
Reviewed-by: Attila Jeges <attilaj@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-10-04 18:36:22 +00:00

28 lines
779 B
Plaintext

====
---- QUERY
# Out of range DATE values in a parquet table.
set abort_on_error=0;
SELECT * FROM $DATABASE.out_of_range_date;
---- TYPES
DATE
---- RESULTS
NULL
NULL
NULL
1969-12-31
1970-01-01
1970-01-02
9999-12-30
9999-12-31
NULL
---- ERRORS
Parquet file '$NAMENODE/test-warehouse/$DATABASE.db/out_of_range_date/out_of_range_date.parquet' column 'v' contains an out of range date. The valid date range is 0001-01-01..9999-12-31. (1 of 4 similar)
====
---- QUERY
# Out of range DATE values in a parquet table.
set abort_on_error=1;
SELECT * FROM $DATABASE.out_of_range_date;
---- CATCH
Parquet file '$NAMENODE/test-warehouse/$DATABASE.db/out_of_range_date/out_of_range_date.parquet' column 'v' contains an out of range date. The valid date range is 0001-01-01..9999-12-31.
====