Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void run() throws JobException {
this.relation = MTMVPlanUtil.generateMTMVRelation(mtmv, ctx);
// Now, the MTMV first ensures consistency with the data in the cache.
// To be completely consistent with hive, you need to manually refresh the cache
// refreshHmsTable();
refreshHmsTable();
if (mtmv.getMvPartitionInfo().getPartitionType() != MTMVPartitionType.SELF_MANAGE) {
MTMVPartitionUtil.alignMvPartition(mtmv);
}
Expand Down Expand Up @@ -282,7 +282,7 @@ public void before() throws JobException {
}

/**
* // Before obtaining information from hmsTable, refresh to ensure that the data is up-to-date
* Before obtaining information from hmsTable, refresh to ensure that the data is up-to-date
*
* @throws AnalysisException
* @throws DdlException
Expand Down
13 changes: 1 addition & 12 deletions regression-test/suites/mtmv_p0/test_hive_refresh_mtmv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ suite("test_hive_refresh_mtmv", "p0,external,hive,external_docker,external_docke
// hive data change
logger.info("hive sql: " + insert_str)
hive_docker """ ${insert_str} """
sql """
REFRESH catalog ${catalog_name}
"""
sql """
REFRESH MATERIALIZED VIEW ${mvName} auto
"""
Expand All @@ -120,9 +117,6 @@ suite("test_hive_refresh_mtmv", "p0,external,hive,external_docker,external_docke
"""
logger.info("hive sql: " + add_partition2021_str)
hive_docker """ ${add_partition2021_str} """
sql """
REFRESH catalog ${catalog_name}
"""
sql """
REFRESH MATERIALIZED VIEW ${mvName} auto
"""
Expand All @@ -139,9 +133,6 @@ suite("test_hive_refresh_mtmv", "p0,external,hive,external_docker,external_docke
"""
logger.info("hive sql: " + drop_partition2021_str)
hive_docker """ ${drop_partition2021_str} """
sql """
REFRESH catalog ${catalog_name}
"""
sql """
REFRESH MATERIALIZED VIEW ${mvName} auto
"""
Expand All @@ -157,9 +148,6 @@ suite("test_hive_refresh_mtmv", "p0,external,hive,external_docker,external_docke
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after refresh materialized view, maybe we should add order_qt to check the mv result is right or not

logger.info("hive sql: " + rename_column_str)
hive_docker """ ${rename_column_str} """
sql """
REFRESH catalog ${catalog_name}
"""
sql """
REFRESH MATERIALIZED VIEW ${mvName} complete
"""
Expand All @@ -172,6 +160,7 @@ suite("test_hive_refresh_mtmv", "p0,external,hive,external_docker,external_docke
"""
logger.info("hive sql: " + recover_column_str)
hive_docker """ ${recover_column_str} """
// schema change need refresh catalog
sql """
REFRESH catalog ${catalog_name}
"""
Expand Down