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

Attributes become unknown in RepartitionByExpression after aliased

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.8, 3.0.2, 3.1.1, 3.2.0
    • Fix Version/s: 3.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      explain extended select a b from values(1) t(a) distribute by a;
      == Parsed Logical Plan ==
      'RepartitionByExpression ['a]
      +- 'Project ['a AS b#42]
         +- 'SubqueryAlias t
            +- 'UnresolvedInlineTable [a], [List(1)]
      
      == Analyzed Logical Plan ==
      org.apache.spark.sql.AnalysisException: cannot resolve 'a' given input columns: [b]; line 1 pos 62;
      'RepartitionByExpression ['a]
      +- Project [a#48 AS b#42]
         +- SubqueryAlias t
            +- LocalRelation [a#48]
      

        Attachments

          Activity

            People

            • Assignee:
              Qin Yao Kent Yao
              Reporter:
              Qin Yao Kent Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: