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

GatherSumApply broken when object reuse enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • None

    Description

      GatherSumApplyIteration.SumUdf.reduce can store a value from arg1 in the new Tuple2 which can be overwritten in ReduceDriver. We need to swap arg0.f1 and arg1.f1 when this happens (as done in ReduceDriver for the returned results).

      	@Override
      	public Tuple2<K, M> reduce(Tuple2<K, M> arg0, Tuple2<K, M> arg1) throws Exception {
      		K key = arg0.f0;
      		M result = this.sumFunction.sum(arg0.f1, arg1.f1);
      		return new Tuple2<>(key, result);
      	}
      

      Attachments

        Activity

          People

            greghogan Greg Hogan
            greghogan Greg Hogan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: