Github user MaxGekk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21720#discussion_r200837706
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
 ---
    @@ -630,11 +630,29 @@ class AstBuilder(conf: SQLConf) extends 
SqlBaseBaseVisitor[AnyRef] with Logging
         val aggregates = Option(ctx.aggregates).toSeq
           .flatMap(_.namedExpression.asScala)
           .map(typedVisit[Expression])
    -    val pivotColumn = UnresolvedAttribute.quoted(ctx.pivotColumn.getText)
    -    val pivotValues = 
ctx.pivotValues.asScala.map(typedVisit[Expression]).map(Literal.apply)
    +    val pivotColumn = if (ctx.pivotColumn.identifiers.size == 1) {
    --- End diff --
    
    Are there any reasons to handle one pivot column separately? And what 
happens if `size == 0`? 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to