Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-32771

The example of expressions.Aggregator in Javadoc / Scaladoc is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0, 3.1.0
    • 2.4.7, 3.0.2, 3.1.0
    • Documentation
    • None

    Description

      There is an example of expressions.Aggregator in Javadoc and Scaladoc like as follows.

      val customSummer =  new Aggregator[Data, Int, Int] {
        def zero: Int = 0
        def reduce(b: Int, a: Data): Int = b + a.i
        def merge(b1: Int, b2: Int): Int = b1 + b2
        def finish(r: Int): Int = r
      }.toColumn()

      But this example doesn't work because it doesn't define bufferEncoder and outputEncoder.

      Attachments

        Activity

          People

            sarutak Kousuke Saruta
            sarutak Kousuke Saruta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: