IMPALA-14011: Skip test_no_hms_event_incremental_refresh_transactional_table on new Hive versions

The feature of hms_event_incremental_refresh_transactional_table is
already mature that it has been enabled for years. We'd like to
deprecate the feature of turning it off. However, for older Hive
versions like Apache Hive 3 that don't provide sufficient APIs for
Impala to process COMMIT_TXN events, users can still turn this off.

This patch skips
test_no_hms_event_incremental_refresh_transactional_table when running
on CDP Hive.

To run the test on Apache Hive 3, adjust the test to create ACID table
using tblproperties instead of "create transactional table" statement.

Tests:
 - Ran the test on CDP Hive and Apache Hive 3.

Change-Id: I93379e5331072bec1d3a4769f7d7ab59431478ee
Reviewed-on: http://gerrit.cloudera.org:8080/23435
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
stiga-huang
2025-09-16 19:22:35 +08:00
committed by Impala Public Jenkins
parent 3c38888dfb
commit 0b619962e6
2 changed files with 10 additions and 2 deletions

View File

@@ -276,6 +276,11 @@ class SkipIfApacheHive():
reason="Apache Hive 3.1 or older version do not support DataConnector")
class SkipIfCdpHive():
deprecated_feature = pytest.mark.skipif(
not IS_APACHE_HIVE, reason="Deprecated feature on CDP Hive support")
class SkipIfExploration:
"""Exposes decorators as methods so that tests can be skipped based on exploration
strategy"""

View File

@@ -30,7 +30,7 @@ from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
from tests.common.impala_connection import ERROR, FINISHED
from tests.common.impala_test_suite import ImpalaTestSuite
from tests.common.parametrize import UniqueDatabase
from tests.common.skip import SkipIf, SkipIfFS
from tests.common.skip import SkipIf, SkipIfFS, SkipIfCdpHive
from tests.common.test_dimensions import add_exec_option_dimension
from tests.util.acid_txn import AcidTxn
from tests.util.hive_utils import HiveDbWrapper
@@ -1339,6 +1339,7 @@ class TestEventProcessingCustomConfigs(TestEventProcessingCustomConfigsBase):
# self.assert_catalogd_log_contains("INFO", "Not added ABORTED write id 1 since it's "
# + "not opened and might already be cleaned up")
@SkipIfCdpHive.deprecated_feature
@CustomClusterTestSuite.with_args(
catalogd_args="--hms_event_incremental_refresh_transactional_table=false",
statestored_args=STATESTORED_ARGS)
@@ -1352,7 +1353,9 @@ class TestEventProcessingCustomConfigs(TestEventProcessingCustomConfigsBase):
part_create = " partitioned by (p int)" if partitioned else ""
part_insert = " partition (p = 1)" if partitioned else ""
create_stmt = "create transactional table {} (i int){}".format(fq_tbl, part_create)
create_stmt = ("create table {} (i int){} stored as ORC "
"tblproperties ('transactional'='true',"
"'transactional_properties'='default')").format(fq_tbl, part_create)
self.run_stmt_in_hive(create_stmt)
EventProcessorUtils.wait_for_event_processing(self)
# Wait for StatestoreD to propagate the update.