-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for ALTER COLUMN ... SET NOT NULL in engine and PostgreSQL connector
#27765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add support for ALTER COLUMN ... SET NOT NULL in engine and PostgreSQL connector
#27765
Conversation
87ece51 to
f83863e
Compare
| throw semanticException(NOT_SUPPORTED, statement, "Cannot modify hidden column"); | ||
| } | ||
| if (!columnMetadata.isNullable()) { | ||
| throw semanticException(NOT_SUPPORTED, statement, "Column is already not nullable"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you confirmed the expected behavior in SQL standard? P.873 in ISO_IEC_9075-2(E)_Foundation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The P.873 doesn't say the behavior if the column is already not nullable, it's depended on the implementation right?
testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/TestSetNotNullConstraintConstraintTask.java
Show resolved
Hide resolved
core/trino-parser/src/main/java/io/trino/sql/tree/SetNotNullConstraint.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/tracing/TracingConnectorMetadata.java
Outdated
Show resolved
Hide resolved
ALTER COLUMN ... SET NOT NULL in PostgreSQL connectorALTER COLUMN ... SET NOT NULL in engine and PostgreSQL connector
f9186f5 to
ddd9a6e
Compare
9944a21 to
4e413fc
Compare
1d8d070 to
c4c6661
Compare
c4c6661 to
1195d42
Compare
Description
Fix #27404
Additional context and related issues
Release notes
() This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: