diff --git a/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates.test b/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-all-fs.test similarity index 90% rename from testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates.test rename to testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-all-fs.test index cc7e865d7..36104c389 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates.test +++ b/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-all-fs.test @@ -39,27 +39,6 @@ regex:.+,regex:.+,'j=1/k=a' STRING, STRING, STRING ==== ---- QUERY -alter table p1 partition (j<2, k in ("b", "c")) set cached in 'testPool' ----- RESULTS -'Cached 2 partition(s).' ----- TYPES -STRING -==== ----- QUERY -alter table p1 partition (j<2, j>0, k<>"d") set uncached ----- RESULTS -'Uncached 2 partition(s).' ----- TYPES -STRING -==== ----- QUERY -alter table p1 partition (j=3 or j=2, k like "%") set uncached ----- RESULTS -'Uncached 0 partition(s).' ----- TYPES -STRING -==== ----- QUERY alter table p1 partition (j=2) set fileformat parquet ---- RESULTS 'Updated 4 partition(s).' diff --git a/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-hdfs-only.test b/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-hdfs-only.test new file mode 100644 index 000000000..5ca2a0636 --- /dev/null +++ b/testdata/workloads/functional-query/queries/QueryTest/partition-ddl-predicates-hdfs-only.test @@ -0,0 +1,38 @@ +==== +---- QUERY +# First create a partitioned table +create table p1_hdfs (i int) partitioned by(j int, k string); +# Add some partitions +alter table p1_hdfs add partition (j=1,k="a"); +alter table p1_hdfs add partition (j=1,k="b"); +alter table p1_hdfs add partition (j=1,k="c"); +alter table p1_hdfs add partition (j=2,k="d"); +alter table p1_hdfs add partition (j=2,k="e"); +alter table p1_hdfs add partition (j=2,k="f"); +alter table p1_hdfs add partition (j=2,k=NULL); +alter table p1_hdfs add partition (j=NULL,k="g"); +alter table p1_hdfs add partition (j=NULL,k=NULL); +# Populate the table +insert into p1_hdfs partition (j, k) values (100, 1, "a"), (200, 1, "b"), (300, 1, "c"); +==== +---- QUERY +alter table p1_hdfs partition (j<2, k in ("b", "c")) set cached in 'testPool' +---- RESULTS +'Cached 2 partition(s).' +---- TYPES +STRING +==== +---- QUERY +alter table p1_hdfs partition (j<2, j>0, k<>"d") set uncached +---- RESULTS +'Uncached 2 partition(s).' +---- TYPES +STRING +==== +---- QUERY +alter table p1_hdfs partition (j=3 or j=2, k like "%") set uncached +---- RESULTS +'Uncached 0 partition(s).' +---- TYPES +STRING +==== diff --git a/tests/metadata/test_ddl.py b/tests/metadata/test_ddl.py index 15fe4c742..58f42eb6e 100644 --- a/tests/metadata/test_ddl.py +++ b/tests/metadata/test_ddl.py @@ -24,7 +24,7 @@ from tests.common.impala_test_suite import LOG from tests.common.parametrize import UniqueDatabase from tests.common.skip import SkipIf, SkipIfLocal, SkipIfOldAggsJoins from tests.common.test_dimensions import create_single_exec_option_dimension -from tests.util.filesystem_utils import WAREHOUSE, IS_LOCAL, IS_S3 +from tests.util.filesystem_utils import WAREHOUSE, IS_HDFS, IS_LOCAL, IS_S3 # Validates DDL statements (create, drop) class TestDdlStatements(TestDdlBase): @@ -393,8 +393,11 @@ class TestDdlStatements(TestDdlBase): @UniqueDatabase.parametrize(sync_ddl=True) def test_partition_ddl_predicates(self, vector, unique_database): - self.run_test_case('QueryTest/partition-ddl-predicates', vector, + self.run_test_case('QueryTest/partition-ddl-predicates-all-fs', vector, use_db=unique_database, multiple_impalad=self._use_multiple_impalad(vector)) + if IS_HDFS: + self.run_test_case('QueryTest/partition-ddl-predicates-hdfs-only', vector, + use_db=unique_database, multiple_impalad=self._use_multiple_impalad(vector)) # IMPALA-2002: Tests repeated adding/dropping of .jar and .so in the lib cache. class TestLibCache(TestDdlBase):