Files
impala/testdata/workloads/functional-query/queries/QueryTest/date-fileformat-support.test
Riza Suminto 182aa5066e IMPALA-13958: Revisit hs2_parquet_constraint and hs2_text_constraint
hs2_parquet_constraint and hs2_text_constraint is meant to extend test
vector dimension to also test non-default test protocol (other than
beeswax), but limit it to only run against 'parquet/none' or 'text/none'
format accordingly.

This patch modifies these constraints to
default_protocol_or_parquet_constraint and
default_protocol_or_text_constraint respectively such that the full file
format coverage happen for default_test_protocol configuration and
limited for the other protocols. Drop hs2_parquet_constraint entirely
from test_utf8_strings.py because that test is already constrained to
single 'parquet/none' file format.

Num modified rows validation in date-fileformat-support.test and
date-partitioning.test are changed to check the NumModifiedRows counter
from profile.

Fix TestQueriesJsonTables to always run with beeswax protocol because
its assertions relies on beeswax-specific return values.

Run impala-isort and fix few flake8 issues and in modified test files.

Testing:
Run and pass the affected test files using exhaustive exploration and
env var DEFAULT_TEST_PROTOCOL=hs2. Confirmed that full file format
coverage happen for hs2 protocol. Note that
DEFAULT_TEST_PROTOCOL=beeswax is still the default.

Change-Id: I8be0a628842e29a8fcc036180654cd159f6a23c8
Reviewed-on: http://gerrit.cloudera.org:8080/22775
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-04-17 22:50:58 +00:00

111 lines
2.5 KiB
Plaintext

====
---- QUERY
# Inserting into parquet table works.
insert into $DATABASE.parquet_date_tbl
values ('2011-05-06'), ('9999-12-31'), ('0001-01-01');
---- RUNTIME_PROFILE
NumModifiedRows: 3
====
---- QUERY
# Querying parquet table written by Parquet-MR and Impala works.
select * from $DATABASE.parquet_date_tbl;
---- RESULTS
1970-02-12
1970-04-11
1972-09-27
2011-05-06
9999-12-31
0001-01-01
---- TYPES
DATE
====
---- QUERY
# Querying avro table is supported.
select * from $DATABASE.avro_date_tbl;
---- RESULTS
1970-01-01
1970-01-02
1224-05-19
8543-11-21
---- TYPES
DATE
====
---- QUERY
# Querying ORC table is supported.
select * from $DATABASE.orc_date_tbl;
---- TYPES
DATE
---- RESULTS
1970-06-12
2008-11-21
9999-12-31
NULL
====
---- QUERY
# Inserting text partitions to $DATABASE.date_tbl is OK.
insert into $DATABASE.date_tbl partition (date_part)
select date_col, date_part from functional.date_tbl;
---- RUNTIME_PROFILE
NumModifiedRows: 7
NumModifiedRows: 3
NumModifiedRows: 10
NumModifiedRows: 2
====
---- QUERY
# Inserting into parquet partition is supported.
insert into $DATABASE.date_tbl partition(date_part='1899-12-31')
select date_col from functional_parquet.date_tbl where date_part = '1399-06-27';
---- RUNTIME_PROFILE
NumModifiedRows: 3
====
---- QUERY
# Adding ORC partition works even though Impala cannot write ORC format.
# Querying all the partitions also works.
alter table $DATABASE.date_tbl add partition (date_part='2099-12-31')
location '$NAMENODE/test-warehouse/$DATABASE.db/orc_date_tbl';
alter table $DATABASE.date_tbl partition (date_part='2099-12-31') set fileformat orc;
select date_part, date_col from $DATABASE.date_tbl;
---- RESULTS
0001-01-01,0001-01-01
0001-01-01,0001-12-31
0001-01-01,0002-01-01
0001-01-01,1399-12-31
0001-01-01,2017-11-28
0001-01-01,9999-12-31
0001-01-01,NULL
1399-06-27,2017-11-28
1399-06-27,NULL
1399-06-27,2018-12-31
2017-11-27,0001-06-21
2017-11-27,0001-06-22
2017-11-27,0001-06-23
2017-11-27,0001-06-24
2017-11-27,0001-06-25
2017-11-27,0001-06-26
2017-11-27,0001-06-27
2017-11-27,0001-06-28
2017-11-27,0001-06-29
2017-11-27,2017-11-28
9999-12-31,9999-12-01
9999-12-31,9999-12-31
1899-12-31,1970-02-12
1899-12-31,1970-04-11
1899-12-31,1972-09-27
1899-12-31,2011-05-06
1899-12-31,9999-12-31
1899-12-31,0001-01-01
1899-12-31,2017-11-28
1899-12-31,NULL
1899-12-31,2018-12-31
1999-12-31,1970-01-01
1999-12-31,1970-01-02
1999-12-31,1224-05-19
1999-12-31,8543-11-21
2099-12-31,1970-06-12
2099-12-31,2008-11-21
2099-12-31,9999-12-31
2099-12-31,NULL
---- TYPES
DATE,DATE
====