Skip to content
Snippets Groups Projects
  • Ziyue Huang's avatar
    e6eb02df
    [DOCS] Fix error: ambiguous reference to overloaded definition · e6eb02df
    Ziyue Huang authored
    ## What changes were proposed in this pull request?
    
    `df.groupBy.count()` should be `df.groupBy().count()` , otherwise there is an error :
    
    ambiguous reference to overloaded definition, both method groupBy in class Dataset of type (col1: String, cols: String*) and method groupBy in class Dataset of type (cols: org.apache.spark.sql.Column*)
    
    ## How was this patch tested?
    
    ```scala
    val df = spark.readStream.schema(...).json(...)
    val dfCounts = df.groupBy().count()
    ```
    
    Author: Ziyue Huang <zyhuang94@gmail.com>
    
    Closes #18272 from ZiyueHuang/master.
    e6eb02df
    History
    [DOCS] Fix error: ambiguous reference to overloaded definition
    Ziyue Huang authored
    ## What changes were proposed in this pull request?
    
    `df.groupBy.count()` should be `df.groupBy().count()` , otherwise there is an error :
    
    ambiguous reference to overloaded definition, both method groupBy in class Dataset of type (col1: String, cols: String*) and method groupBy in class Dataset of type (cols: org.apache.spark.sql.Column*)
    
    ## How was this patch tested?
    
    ```scala
    val df = spark.readStream.schema(...).json(...)
    val dfCounts = df.groupBy().count()
    ```
    
    Author: Ziyue Huang <zyhuang94@gmail.com>
    
    Closes #18272 from ZiyueHuang/master.