master #59
|
@ -111,7 +111,9 @@ public class PromoteActionPayloadFunctions {
|
||||||
SerializableSupplier<Function<G, Boolean>> isNotZeroFn,
|
SerializableSupplier<Function<G, Boolean>> isNotZeroFn,
|
||||||
Class<G> rowClazz) {
|
Class<G> rowClazz) {
|
||||||
TypedColumn<G, G> aggregator = new TableAggregator<>(zeroFn, mergeAndGetFn, isNotZeroFn, rowClazz).toColumn();
|
TypedColumn<G, G> aggregator = new TableAggregator<>(zeroFn, mergeAndGetFn, isNotZeroFn, rowClazz).toColumn();
|
||||||
|
|
||||||
return rowDS
|
return rowDS
|
||||||
|
.filter((FilterFunction<G>) o -> isNotZeroFn.get().apply(o))
|
||||||
.groupByKey((MapFunction<G, String>) x -> rowIdFn.get().apply(x), Encoders.STRING())
|
.groupByKey((MapFunction<G, String>) x -> rowIdFn.get().apply(x), Encoders.STRING())
|
||||||
.agg(aggregator)
|
.agg(aggregator)
|
||||||
.map((MapFunction<Tuple2<String, G>, G>) Tuple2::_2, Encoders.kryo(rowClazz));
|
.map((MapFunction<Tuple2<String, G>, G>) Tuple2::_2, Encoders.kryo(rowClazz));
|
||||||
|
|
Loading…
Reference in New Issue