Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.3.0, 1.2.1
    • Component/s: DataSet API, Documentation
    • Labels:
      None

      Description

      the example of GroupReduce on sorted groups can't remove duplicate Strings in a DataSet.
      need to add "prev=t"
      such as:

      val output = input.groupBy(0).sortGroup(1, Order.ASCENDING).reduceGroup {
            (in, out: Collector[(Int, String)]) =>
              var prev: (Int, String) = null
              for (t <- in) {
                if (prev == null || prev != t)
                  out.collect(t)
                  prev=t // this line is missing in the example
              }
          }
      

        Activity

        Hide
        fhueske Fabian Hueske added a comment -

        Can you provide a more detailed description of the problem? Which behavior is unexpected? What would you expect to happen?

        Thank you, Fabian

        Show
        fhueske Fabian Hueske added a comment - Can you provide a more detailed description of the problem? Which behavior is unexpected? What would you expect to happen? Thank you, Fabian
        Hide
        StephanEwen Stephan Ewen added a comment -

        I think there is simply one line missing in the example - the example is thus incorrect.

        Could you open a pull request for this issue?

        Show
        StephanEwen Stephan Ewen added a comment - I think there is simply one line missing in the example - the example is thus incorrect. Could you open a pull request for this issue?
        Hide
        Zentol Chesnay Schepler added a comment -

        1.2: f8255880c2bd9fb7e7dd0069319aeb283b523322
        1.3: cf28a562159a7a73deb2c214c221bd935250387b

        Show
        Zentol Chesnay Schepler added a comment - 1.2: f8255880c2bd9fb7e7dd0069319aeb283b523322 1.3: cf28a562159a7a73deb2c214c221bd935250387b

          People

          • Assignee:
            Zentol Chesnay Schepler
            Reporter:
            toby1992 苏拓
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development