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

Attributes become unknown in RepartitionByExpression after aliased

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.8, 3.0.2, 3.1.1, 3.2.0
    • 3.2.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: