Skip to content
  • Reynold Xin's avatar
    f3152722
    [SPARK-11946][SQL] Audit pivot API for 1.6. · f3152722
    Reynold Xin authored
    Currently pivot's signature looks like
    
    ```scala
    scala.annotation.varargs
    def pivot(pivotColumn: Column, values: Column*): GroupedData
    
    scala.annotation.varargs
    def pivot(pivotColumn: String, values: Any*): GroupedData
    ```
    
    I think we can remove the one that takes "Column" types, since callers should always be passing in literals. It'd also be more clear if the values are not varargs, but rather Seq or java.util.List.
    
    I also made similar changes for Python.
    
    Author: Reynold Xin <rxin@databricks.com>
    
    Closes #9929 from rxin/SPARK-11946.
    f3152722
    [SPARK-11946][SQL] Audit pivot API for 1.6.
    Reynold Xin authored
    Currently pivot's signature looks like
    
    ```scala
    scala.annotation.varargs
    def pivot(pivotColumn: Column, values: Column*): GroupedData
    
    scala.annotation.varargs
    def pivot(pivotColumn: String, values: Any*): GroupedData
    ```
    
    I think we can remove the one that takes "Column" types, since callers should always be passing in literals. It'd also be more clear if the values are not varargs, but rather Seq or java.util.List.
    
    I also made similar changes for Python.
    
    Author: Reynold Xin <rxin@databricks.com>
    
    Closes #9929 from rxin/SPARK-11946.
Loading