Skip to content

HIVE-29609: HPL/SQL leaving behind hive-staging directories#6500

Merged
soumyakanti3578 merged 1 commit into
apache:masterfrom
mdayakar:HIVE-29609_HPLSQL_StagingDir_Issue
May 21, 2026
Merged

HIVE-29609: HPL/SQL leaving behind hive-staging directories#6500
soumyakanti3578 merged 1 commit into
apache:masterfrom
mdayakar:HIVE-29609_HPLSQL_StagingDir_Issue

Conversation

@mdayakar
Copy link
Copy Markdown
Contributor

HIVE-29609: HPL/SQL leaving behind hive-staging directories

What changes were proposed in this pull request?

When INSERT statements are executed in hplsql mode then the Hive statging directories under the table path are not getting deleted due to driver.close() is not getting called(which internally calls context.clear() which eventually deletes the staging directories under the table path) after the INSERT statement execution is successful in HPLSQL mode. As a part of fix now calling drive.close() which deletes the staging directories.

Why are the changes needed?

To delete the staging directories present under table path.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tests are added.

Comment thread itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java Outdated
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@soumyakanti3578 soumyakanti3578 left a comment

Choose a reason for hiding this comment

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

LGTM

@soumyakanti3578 soumyakanti3578 merged commit 2310266 into apache:master May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants