Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is the continuation of effort done as part of #9457
Enabled hive.managed-table-auto-purge-default optional property at catalog level & will be enforced if auto_purge at table level is not set. This serves as default value for table property auto_purge & removes the
need to set auto_purge each and every time managed table is created. As mentioned in #11575 user is also seeing issue trino:> drop table withacid;
Query failed: The following metastore delete operations failed: drop table with acid
io.trino.spi.TrinoException: The following metastore delete operations failed: drop table withacid
This is happening as auto_purge is not set to true. hive.managed-table-auto-purge-default optional parameter gives flexibility to admin to enforce this at catalog level
there by apply to all the tables that will be created.
This change is a improvement.
This is a change to Hive connector
auto_purge = true allows to skip trash & speed up the dropping managed tables for hive connector. Current implementation requires user to specify the flag during the table creation. With this change
it gives the flexibility to set the auto_purge at catalog level.
Related issues, pull requests, and links
Related Issue: #11575
Related PR: #9457
Documentation
( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
() Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( x) No release notes entries required.
() Release notes entries required with the following suggested text: