Skip to content

Deny comment on unsupported table#11430

Closed
kyo-tom wants to merge 1 commit intotrinodb:masterfrom
kyo-tom:deny_comment_on_unsuppurt_tables1
Closed

Deny comment on unsupported table#11430
kyo-tom wants to merge 1 commit intotrinodb:masterfrom
kyo-tom:deny_comment_on_unsuppurt_tables1

Conversation

@kyo-tom
Copy link
Copy Markdown
Contributor

@kyo-tom kyo-tom commented Mar 11, 2022

Description

Deny comment on unsupported table

Is this change a fix, improvement, new feature, refactoring, or other?
It is a fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)
CreateTableTask and CommentTask

How would you describe this change to a non-technical end user or system administrator?
It will deny the operate of comment on unsupported table when you create table with comment or comment on table.

Related issues, pull requests, and links

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

( ) No release notes entries required.
(x) Release notes entries required with the following suggested text:

# Section
* Fix deny the operate of comment on unsupported table. ({issue}`11348`)

@cla-bot cla-bot bot added the cla-signed label Mar 11, 2022
@kyo-tom kyo-tom requested a review from findepi March 11, 2022 09:02
@kyo-tom kyo-tom force-pushed the deny_comment_on_unsuppurt_tables1 branch from ba9461f to 0245b60 Compare March 11, 2022 10:05
public enum ConnectorCapabilities
{
NOT_NULL_COLUMN_CONSTRAINT,
COMMENT_ON_TABLE,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It should be add into MongoConnector after the pr #11424 merged

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

per #11348 (comment) i think it's too late to add this to ConnectorCapabilities. The damage has been done and the ship has sailed. Adding this now would be a breaking change.

cc @hashhar @ebyhr

Copy link
Copy Markdown
Member

@hashhar hashhar Mar 11, 2022

Choose a reason for hiding this comment

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

Agreed. Instead I'd suggest to add a test to BaseConnectorTest that asserts that COMMENT ON TABLE works.
For the connectors where it fails you need to disallow it in their ConnectorMetadata implementations. (as discussed on #11348 (comment))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@findepi @hashhar Sorry, I'm a little busy these days so I can't reply in time.I don't understand why now is too late to add this to ConnectorCapabilities. Is there some connectors is supported COMMENT ON TABLE but is not supported CREATE TABLE ... COMENT.

@ebyhr
Copy link
Copy Markdown
Member

ebyhr commented Sep 2, 2022

Superseded by #11493

@ebyhr ebyhr closed this Sep 2, 2022
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.

Deny CREATE TABLE with comment if the connector doesn't support storing comments

4 participants