Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-970

Implement a first(n) operator

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      It is only syntactic sugar, but I had many cases where I just needed the first element or the first 2 elements in a GroupReduce.

      E.g. Instead of

      .reduceGroup(new GroupReduceFunction<String, String>() {
      					@Override
      					public void reduce(Iterator<String> values, Collector<String> out) throws Exception {
      						out.collect(values.next());
      					}
      				})
      
      .first()
      

      Attachments

        Activity

          People

            chesnay Chesnay Schepler
            twalthr Timo Walther
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: