Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19842 Informational Referential Integrity Constraints Support in Spark
  3. SPARK-21823

ALTER TABLE table statements such as RENAME and CHANGE columns should raise error if there are any dependent constraints.

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tsuresh Suresh Thalamati

            Dates

              Created:
              Updated:

              Slack

                Issue deployment