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

Update RDD.treeAggregate not to use reduce

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: ML, MLlib, Spark Core
    • Labels:
      None

      Description

      *Issue*
      In MLlib, we have assumed that RDD.treeAggregate allows the seqOp and combOp functions to modify and return their first argument, just like RDD.aggregate. However, it is not documented that way.

      I started to add docs to this effect, but then noticed that treeAggregate uses reduceByKey and reduce in its implementation, neither of which technically allows the seq/combOps to modify and return their first arguments.

      *Question*: Is the implementation safe, or does it need to be updated?

      *Decision*: Avoid using reduce. Use fold instead.

        Attachments

          Activity

            People

            • Assignee:
              josephkb Joseph K. Bradley
              Reporter:
              josephkb Joseph K. Bradley
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: