/** * Applies an aggregation that gives a rolling sum of the data stream at the * given position grouped by the given key. An independent aggregate is kept * per key. * * @param positionToSum * The field position in the data points to sum. This is applicable to * Tuple types, basic and primitive array types, Scala case classes, * and primitive types (which is considered as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, getType(), getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum of the data stream * at the given position by the given key. An independent aggregate is kept * per key. * * @param positionToMax * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, getType(), AggregationFunction.AggregationType.MAX, getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum of the data * stream at the given position by the given key. An independent aggregate * is kept per key. * * @param positionToMin * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, getType(), AggregationFunction.AggregationType.MIN, getExecutionConfig())); }
/** * Applies an aggregation that gives the current sum of the data * stream at the given field by the given key. An independent * aggregate is kept per key. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(String field) { return aggregate(new SumAggregator<>(field, getType(), getExecutionConfig())); }
/** * Applies an aggregation that gives the current element with the * maximum value at the given position by the given key. An independent * aggregate is kept per key. If more elements have the maximum value at the * given position, the operator returns either the first or last one, * depending on the parameter set. * * @param positionToMaxBy * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @param first * If true, then the operator return the first element with the * maximum value, otherwise returns the last * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> maxBy(int positionToMaxBy, boolean first) { return aggregate(new ComparableAggregator<>(positionToMaxBy, getType(), AggregationFunction.AggregationType.MAXBY, first, getExecutionConfig())); }
/** * Applies an aggregation that gives the current element with the * minimum value at the given position by the given key. An independent * aggregate is kept per key. If more elements have the minimum value at the * given position, the operator returns either the first or last one, * depending on the parameter set. * * @param positionToMinBy * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @param first * If true, then the operator return the first element with the * minimal value, otherwise returns the last * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> minBy(int positionToMinBy, boolean first) { return aggregate(new ComparableAggregator<T>(positionToMinBy, getType(), AggregationFunction.AggregationType.MINBY, first, getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum of the * data stream at the given field expression by the given key. An * independent aggregate is kept per key. A field expression is either the * name of a public field or a getter method with parentheses of the * {@link DataStream}'s underlying type. A dot can be used to drill down into * objects, as in {@code "field1.fieldxy" }. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> min(String field) { return aggregate(new ComparableAggregator<>(field, getType(), AggregationFunction.AggregationType.MIN, false, getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum of the * data stream at the given field expression by the given key. An * independent aggregate is kept per key. A field expression is either the * name of a public field or a getter method with parentheses of the * {@link DataStream}'s underlying type. A dot can be used to drill down into * objects, as in {@code "field1.fieldxy" }. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> max(String field) { return aggregate(new ComparableAggregator<>(field, getType(), AggregationFunction.AggregationType.MAX, false, getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum element of the * data stream by the given field expression by the given key. An * independent aggregate is kept per key. A field expression is either the * name of a public field or a getter method with parentheses of the * {@link DataStream}'s underlying type. A dot can be used to drill down into * objects, as in {@code "field1.fieldxy" }. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @param first * If True then in case of field equality the first object will * be returned * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> maxBy(String field, boolean first) { return aggregate(new ComparableAggregator<>(field, getType(), AggregationFunction.AggregationType.MAXBY, first, getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum element of the * data stream by the given field expression by the given key. An * independent aggregate is kept per key. A field expression is either the * name of a public field or a getter method with parentheses of the * {@link DataStream}'s underlying type. A dot can be used to drill down into * objects, as in {@code "field1.fieldxy" }. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @param first * If True then in case of field equality the first object will * be returned * @return The transformed DataStream. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public SingleOutputStreamOperator<T> minBy(String field, boolean first) { return aggregate(new ComparableAggregator(field, getType(), AggregationFunction.AggregationType.MINBY, first, getExecutionConfig())); }
/** * Applies an aggregation that gives a rolling sum of the data stream at the * given position grouped by the given key. An independent aggregate is kept * per key. * * @param positionToSum * The field position in the data points to sum. This is applicable to * Tuple types, basic and primitive array types, Scala case classes, * and primitive types (which is considered as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, getType(), getExecutionConfig())); }
/** * Applies an aggregation that gives a rolling sum of the data stream at the * given position grouped by the given key. An independent aggregate is kept * per key. * * @param positionToSum * The field position in the data points to sum. This is applicable to * Tuple types, basic and primitive array types, Scala case classes, * and primitive types (which is considered as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, getType(), getExecutionConfig())); }
/** * Applies an aggregation that gives a rolling sum of the data stream at the * given position grouped by the given key. An independent aggregate is kept * per key. * * @param positionToSum * The field position in the data points to sum. This is applicable to * Tuple types, basic and primitive array types, Scala case classes, * and primitive types (which is considered as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(int positionToSum) { return aggregate(new SumAggregator<>(positionToSum, getType(), getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum of the data * stream at the given position by the given key. An independent aggregate * is kept per key. * * @param positionToMin * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, getType(), AggregationFunction.AggregationType.MIN, getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum of the data * stream at the given position by the given key. An independent aggregate * is kept per key. * * @param positionToMin * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, getType(), AggregationFunction.AggregationType.MIN, getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum of the data stream * at the given position by the given key. An independent aggregate is kept * per key. * * @param positionToMax * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, getType(), AggregationFunction.AggregationType.MAX, getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum of the data stream * at the given position by the given key. An independent aggregate is kept * per key. * * @param positionToMax * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, getType(), AggregationFunction.AggregationType.MAX, getExecutionConfig())); }
/** * Applies an aggregation that gives the current minimum of the data * stream at the given position by the given key. An independent aggregate * is kept per key. * * @param positionToMin * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> min(int positionToMin) { return aggregate(new ComparableAggregator<>(positionToMin, getType(), AggregationFunction.AggregationType.MIN, getExecutionConfig())); }
/** * Applies an aggregation that gives the current maximum of the data stream * at the given position by the given key. An independent aggregate is kept * per key. * * @param positionToMax * The field position in the data points to minimize. This is applicable to * Tuple types, Scala case classes, and primitive types (which is considered * as having one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> max(int positionToMax) { return aggregate(new ComparableAggregator<>(positionToMax, getType(), AggregationFunction.AggregationType.MAX, getExecutionConfig())); }
/** * Applies an aggregation that gives the current sum of the data * stream at the given field by the given key. An independent * aggregate is kept per key. * * @param field * In case of a POJO, Scala case class, or Tuple type, the * name of the (public) field on which to perform the aggregation. * Additionally, a dot can be used to drill down into nested * objects, as in {@code "field1.fieldxy" }. * Furthermore "*" can be specified in case of a basic type * (which is considered as having only one field). * @return The transformed DataStream. */ public SingleOutputStreamOperator<T> sum(String field) { return aggregate(new SumAggregator<>(field, getType(), getExecutionConfig())); }