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

    https://github.com/apache/spark/pull/21720#discussion_r200830835
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -515,13 +515,33 @@ class Analyzer(
                     s"Aggregate expression required for pivot, found '$e'")
               }
             }
    +        // Check all pivot values are literal and match pivot column data 
type.
    +        val evalPivotValues = pivotValues.map { value =>
    +          if (!Cast.canCast(value.dataType, pivotColumn.dataType)) {
    +            throw new AnalysisException(s"Invalid pivot value '$value': " +
    +              s"value data type ${value.dataType.simpleString} does not 
match " +
    --- End diff --
    
    `simpleString` -> `catalogString`


---

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

Reply via email to