Skip to content

[GLUTEN-12856][TEST] Use withTable for table cleanup in Hive SQL query suites - #13405

Open
shivadarshan-devadiga wants to merge 2 commits into
apache:mainfrom
shivadarshan-devadiga:fix-hive-sql-suite-table-cleanup
Open

shivadarshan-devadiga wants to merge 2 commits into
apache:mainfrom
shivadarshan-devadiga:fix-hive-sql-suite-table-cleanup

Conversation

@shivadarshan-devadiga

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Fixes #12856

The Hive SQL query suites created persistent Hive tables and dropped them only after the assertions ran. The drop was a plain statement outside withTable or a finally, so a failed assertion skipped it. The Hive suites share one TestHive singleton, so the leftover table stayed in the metastore and warehouse, and later cases in the same JVM could see it. Some cases also mixed two cleanup styles: a DROP TABLE IF EXISTS at the start of the body and spark.sessionState.catalog.dropTable(...) at the end.

This PR wraps each affected case in withTable(...) and removes the manual drops, across all five modules (gluten-ut/spark34, spark35, spark40, spark41, spark42)

How was this patch tested?

CI

Was this patch authored or co-authored using generative AI tooling?

No

@shivadarshan-devadiga

shivadarshan-devadiga commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

@zhouyuan @LuciferYang @philo-he Can you please take a look

@github-actions github-actions Bot added the CORE works for Gluten Core label Oct 21, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@LuciferYang LuciferYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, LGTM

@shivadarshan-devadiga

Copy link
Copy Markdown
Contributor Author

Gentle ping @zhouyuan @philo-he

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VL] GlutenHiveSQLQuerySuite leaks Hive tables on failure: cleanup sits outside withTable/finally

2 participants