Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-18209 More robust view canonicalization without full SQL expansion
  3. SPARK-19211

Explicitly prevent Insert into View or Create View As Insert

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • SQL
    • None

    Description

      Currently we don't explicitly forbid the following behaviors:
      1. The statement CREATE VIEW AS INSERT INTO throws the following exception from SQLBuilder:
      `java.lang.UnsupportedOperationException: unsupported plan InsertIntoTable MetastoreRelation default, tbl, false, false`;
      2. The statement INSERT INTO view VALUES throws the following exception from checkAnalysis:
      `Error in query: Inserting into an RDD-based table is not allowed.;;`

      We should check for these behaviors earlier and explicitly prevent them.

      Attachments

        Activity

          People

            jiangxb1987 Xingbo Jiang
            jiangxb1987 Xingbo Jiang
            Herman van Hövell Herman van Hövell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: