Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33392 Align DSv2 commands to DSv1 implementation
  3. SPARK-33650

Misleading error from ALTER TABLE .. PARTITION for non-supported partition management table

    XMLWordPrintableJSON

Details

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

    Description

      For a V2 table that doesn't support partition management, ALTER TABLE .. ADD/DROP PARTITION throws misleading exception:

      PartitionSpecs are not resolved;;
      'AlterTableAddPartition [UnresolvedPartitionSpec(Map(id -> 1),None)], false
      +- ResolvedTable org.apache.spark.sql.connector.InMemoryTableCatalog@2fd64b11, ns1.ns2.tbl, org.apache.spark.sql.connector.InMemoryTable@5d3ff859
      
      org.apache.spark.sql.AnalysisException: PartitionSpecs are not resolved;;
      'AlterTableAddPartition [UnresolvedPartitionSpec(Map(id -> 1),None)], false
      +- ResolvedTable org.apache.spark.sql.connector.InMemoryTableCatalog@2fd64b11, ns1.ns2.tbl, org.apache.spark.sql.connector.InMemoryTable@5d3ff859
      
      	at org.apache.spark.sql.catalyst.analysis.CheckAnalysis.failAnalysis(CheckAnalysis.scala:50)
      	at org.apache.spark.sql.catalyst.analysis.CheckAnalysis.failAnalysis$(CheckAnalysis.scala:49)
      

      The error should say that the table doesn't support partition management.

      Attachments

        Activity

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: