master #59

Closed
claudio.atzori wants to merge 3221 commits from master into stable_ids
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 1e423fdc07 - Show all commits

View File

@ -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));