Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.0
-
None
-
None
Description
Following ALTER TABLE DDL statements will impact the informational constraints defined on a table:
ALTER TABLE name RENAME TO new_name ALTER TABLE name CHANGE column_name new_name new_type
Spark SQL should raise errors if there are informational constraints defined on the columns affected by the ALTER and let the user drop constraints before proceeding with the DDL. In the future we can enhance the ALTER to automatically fix up the constraint definition in the catalog when possible, and not raise error
When spark adds support for DROP/REPLACE of columns they will impact informational constraints.
ALTER TABLE name DROP [COLUMN] column_name ALTER TABLE name REPLACE COLUMNS (col_spec[, col_spec ...])
Attachments
Issue Links
- is blocked by
-
SPARK-21784 Add ALTER TABLE ADD CONSTRANT DDL to support defining primary key and foreign keys
- In Progress