Skip to content

Document allow-drop-table property in JDBC connectors#10795

Closed
jhlodin wants to merge 1 commit intotrinodb:masterfrom
jhlodin:jl/enable-alter-table
Closed

Document allow-drop-table property in JDBC connectors#10795
jhlodin wants to merge 1 commit intotrinodb:masterfrom
jhlodin:jl/enable-alter-table

Conversation

@jhlodin
Copy link
Copy Markdown
Contributor

@jhlodin jhlodin commented Jan 25, 2022

As of Trino 368 at least, the allow-drop-table property must be enabled to allow DROP TABLE statements. This is at least true for JDBC connectors, need clarification if this applies to others.

@cla-bot cla-bot bot added the cla-signed label Jan 25, 2022
@jhlodin jhlodin requested review from Jessie212, ebyhr, electrum, hashhar and mosabua and removed request for hashhar January 25, 2022 18:10
@jhlodin jhlodin added the docs label Jan 25, 2022
Copy link
Copy Markdown
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

Correct. Only applies to JDBC connectors.

Note that we will revisit this once/if #588 makes in.

I have yet to check the list of JDBC connectors that support this.

@jhlodin jhlodin force-pushed the jl/enable-alter-table branch from edd4754 to 8b8deba Compare January 25, 2022 18:23
Copy link
Copy Markdown
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

Add phoenix - but it has the default value set to true.

Other than that only druid is missing in this PR.

@hashhar
Copy link
Copy Markdown
Member

hashhar commented Jan 25, 2022

Note that other connectors (like Hive and Cassandra) have "equivalent" configs (e.g. hive.allow-drop-table and cassandra.allow-drop-table) but they just happen to have the similar name as this config and are unrelated otherwise.

@jhlodin jhlodin force-pushed the jl/enable-alter-table branch from 8b8deba to 0a4950c Compare January 25, 2022 20:17
@jhlodin
Copy link
Copy Markdown
Contributor Author

jhlodin commented Jan 25, 2022

@hashhar Added a custom version of the fragment to Phoenix, noting that it's enabled by default but can be disabled.

I skipped over adding the fragment to Druid because it's read-only, so there's no point in enabling the property.

Copy link
Copy Markdown
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

We're going to drop this property. I need to update and merge #588.

@jhlodin
Copy link
Copy Markdown
Contributor Author

jhlodin commented Jan 25, 2022

We're going to drop this property. I need to update and merge #588.

Thanks @electrum . Do you have a target release for that PR? If that's still TBD, I think for the sake of user experience we ought to document this behavior and revert once #588 is live. Reason being, we say that DROP TABLE is supported in these connectors, but when the user attempts to run that statement they get a generic "DROP TABLE is not allowed" error with no guidance on how to allow it.

@mosabua
Copy link
Copy Markdown
Member

mosabua commented Jan 25, 2022

I am in favour of dropping the property, but given that we keep getting questions on slack and other forums we should get either the docs updated or the code changed merged asap.

@jhlodin
Copy link
Copy Markdown
Contributor Author

jhlodin commented Jan 28, 2022

Chatted with @electrum , the goal is to get #588 merged for 370. If it doesn't make that release, we agreed to merge this docs PR. So this can sit tight until it's either merged or closed with 370.

@jhlodin
Copy link
Copy Markdown
Contributor Author

jhlodin commented Feb 2, 2022

Looks like #588 is merged! @electrum Should I take that as confirmation that it's ok to close this PR?

@jhlodin
Copy link
Copy Markdown
Contributor Author

jhlodin commented Feb 2, 2022

Closing as the PR to remove this property has been merged.

@jhlodin jhlodin closed this Feb 2, 2022
@jhlodin jhlodin deleted the jl/enable-alter-table branch February 2, 2022 20:02
@electrum
Copy link
Copy Markdown
Member

electrum commented Feb 3, 2022

Thanks @jhlodin for reminding me to get this change in. This legacy and confusing property is finally gone!

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

Development

Successfully merging this pull request may close these issues.

4 participants