Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20831

Unresolved operator when INSERT OVERWRITE data source tables with IF NOT EXISTS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.1, 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

      Currently, we have a bug when we specify `IF NOT EXISTS` in `INSERT OVERWRITE` data source tables. For example, given a query:

      INSERT OVERWRITE TABLE $tableName partition (b=2, c=3) IF NOT EXISTS SELECT 9, 10
      

      we will get the following error:

      unresolved operator 'InsertIntoTable Relation[a#425,d#426,b#427,c#428] parquet, Map(b -> Some(2), c -> Some(3)), true, true;;
      'InsertIntoTable Relation[a#425,d#426,b#427,c#428] parquet, Map(b -> Some(2), c -> Some(3)), true, true
      +- Project [cast(9#423 as int) AS a#429, cast(10#424 as int) AS d#430]
         +- Project [9 AS 9#423, 10 AS 10#424]
            +- OneRowRelation$
      

      Attachments

        Activity

          People

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: