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

Analyze 'exists' default expression instead of 'current' default expression in structField to v2 column conversion

    XMLWordPrintableJSON

Details

    Description

      org.apache.spark.sql.catalyst.util.ResolveDefaultColumns#analyze method accepts 3 parameter

      1) Field to analyze
      2) Statement type - String

      3) Metadata key - CURRENT_DEFAULT or EXISTS_DEFAULT

      Method org.apache.spark.sql.connector.catalog.CatalogV2Util#structFieldToV2Column
      pass fieldToAnalyze and EXISTS_DEFAULT as second parameter, so it is not metadata key, instead of that, it is statement type, so bad expression is analyzed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              uros.stankovic Uros Stankovic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: