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

    https://github.com/apache/spark/pull/21926#discussion_r206406546
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -529,6 +529,10 @@ class Analyzer(
             || (p.groupByExprsOpt.isDefined && 
!p.groupByExprsOpt.get.forall(_.resolved))
             || !p.pivotColumn.resolved || !p.pivotValues.forall(_.resolved) => 
p
           case Pivot(groupByExprsOpt, pivotColumn, pivotValues, aggregates, 
child) =>
    +        if (!RowOrdering.isOrderable(pivotColumn.dataType)) {
    +          throw new AnalysisException(
    +            s"Invalid pivot column '${pivotColumn}'. Pivot columns must be 
comparable.")
    --- End diff --
    
    To the other reviewers, this is consistent with the requirements of 
group-by columns. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to