Skip to content

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

Open
mdayakar wants to merge 1 commit into
apache:masterfrom
mdayakar:HIVE-29609_HPLSQL_StagingDir_Issue
Open

HIVE-29609: HPL/SQL leaving behind hive-staging directories#6500
mdayakar wants to merge 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
@mdayakar mdayakar force-pushed the HIVE-29609_HPLSQL_StagingDir_Issue branch from 6d33b25 to 09ffed9 Compare May 20, 2026 17:25
@sonarqubecloud
Copy link
Copy Markdown

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