From 015851dd0f52fcb5ce40309ca34bba75370c57e8 Mon Sep 17 00:00:00 2001 From: daidai Date: Fri, 3 Jan 2025 18:15:49 +0800 Subject: [PATCH] [fix](regression)fix hive translation unstable case. --- .../hive/scripts/create_preinstalled_scripts/run25.hql | 7 ++++--- .../hive/test_hive_translation_insert_only.groovy | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/thirdparties/docker-compose/hive/scripts/create_preinstalled_scripts/run25.hql b/docker/thirdparties/docker-compose/hive/scripts/create_preinstalled_scripts/run25.hql index da6400bdff0220..66e73f51df8f4c 100755 --- a/docker/thirdparties/docker-compose/hive/scripts/create_preinstalled_scripts/run25.hql +++ b/docker/thirdparties/docker-compose/hive/scripts/create_preinstalled_scripts/run25.hql @@ -61,7 +61,8 @@ STORED AS ORC; INSERT INTO TABLE orc_to_acid_compacted_tb PARTITION (part_col=101) VALUES (1, 'A'), (3, 'C'); INSERT INTO TABLE orc_to_acid_compacted_tb PARTITION (part_col=102) VALUES (2, 'B'); ALTER TABLE orc_to_acid_compacted_tb SET TBLPROPERTIES ('transactional'='true'); -ALTER TABLE orc_to_acid_compacted_tb COMPACT 'major'; +ALTER TABLE orc_to_acid_compacted_tb partition(part_col='101') COMPACT 'major' and wait; +ALTER TABLE orc_to_acid_compacted_tb partition(part_col='102') COMPACT 'major' and wait; INSERT INTO TABLE orc_to_acid_compacted_tb PARTITION (part_col=102) VALUES (4, 'D'); update orc_to_acid_compacted_tb set value = "CC" where id = 3; update orc_to_acid_compacted_tb set value = "BB" where id = 2; @@ -75,7 +76,7 @@ insert into orc_acid_minor values (1, 'A'); insert into orc_acid_minor values (2, 'B'); insert into orc_acid_minor values (3, 'C'); update orc_acid_minor set value = "BB" where id = 2; -ALTER TABLE orc_acid_minor COMPACT 'minor'; +ALTER TABLE orc_acid_minor COMPACT 'minor' and wait; insert into orc_acid_minor values (4, 'D'); update orc_acid_minor set value = "DD" where id = 4; DELETE FROM orc_acid_minor WHERE id = 3; @@ -89,7 +90,7 @@ insert into orc_acid_major values (1, 'A'); insert into orc_acid_major values (2, 'B'); insert into orc_acid_major values (3, 'C'); update orc_acid_major set value = "BB" where id = 2; -ALTER TABLE orc_acid_major COMPACT 'minor'; +ALTER TABLE orc_acid_major COMPACT 'minor' and wait; insert into orc_acid_major values (4, 'D'); update orc_acid_major set value = "DD" where id = 4; DELETE FROM orc_acid_major WHERE id = 3; diff --git a/regression-test/suites/external_table_p2/hive/test_hive_translation_insert_only.groovy b/regression-test/suites/external_table_p2/hive/test_hive_translation_insert_only.groovy index 62a9727ed86e06..758417c32373b5 100644 --- a/regression-test/suites/external_table_p2/hive/test_hive_translation_insert_only.groovy +++ b/regression-test/suites/external_table_p2/hive/test_hive_translation_insert_only.groovy @@ -21,6 +21,7 @@ suite("test_hive_translation_insert_only", "p2,external,hive,external_remote,ext //hudi hive use same catalog in p2. if (enabled == null || !enabled.equalsIgnoreCase("true")) { logger.info("disable test") + return; } String props = context.config.otherConfigs.get("hudiEmrCatalog")