Keys.FieldPositionKeys<T> keys = new Keys.FieldPositionKeys<T>(keyPositions, getType(), false); return new DeltaIteration<T, R>(getExecutionEnvironment(), getType(), this, workset, keys, maxIterations);
/** * Groups a {@link Tuple} {@link DataSet} using field position keys.<br/> * <b>Note: Field position keys only be specified for Tuple DataSets.</b></br> * The field position keys specify the fields of Tuples on which the DataSet is grouped. * This method returns an {@link UnsortedGrouping} on which one of the following grouping transformation * can be applied. * <ul> * <li>{@link UnsortedGrouping#sortGroup(int, eu.stratosphere.api.common.operators.Order)} to get a {@link SortedGrouping}. * <li>{@link Grouping#aggregate(Aggregations, int)} to apply an Aggregate transformation. * <li>{@link Grouping#reduce(ReduceFunction)} to apply a Reduce transformation. * <li>{@link Grouping#reduceGroup(GroupReduceFunction)} to apply a GroupReduce transformation. * </ul> * * @param fields One or more field positions on which the DataSet will be grouped. * @return A Grouping on which a transformation needs to be applied to obtain a transformed DataSet. * * @see Tuple * @see Grouping * @see UnsortedGrouping * @see SortedGrouping * @see AggregateOperator * @see ReduceOperator * @see GroupReduceOperator * @see DataSet */ public UnsortedGrouping<T> groupBy(int... fields) { return new UnsortedGrouping<T>(this, new Keys.FieldPositionKeys<T>(fields, getType(), false)); }
/** * Continues a Join transformation. <br/> * Defines the {@link Tuple} fields of the first join {@link DataSet} that should be used as join keys.<br/> * <b>Note: Fields can only be selected as join keys on Tuple DataSets.</b><br/> * * @param fields The indexes of the Tuple fields of the first join DataSets that should be used as keys. * @return An incomplete Join transformation. * Call {@link JoinOperatorSetsPredicate#equalTo(int...)} or {@link JoinOperatorSetsPredicate#equalTo(KeySelector)} * to continue the Join. * * @see Tuple * @see DataSet */ public JoinOperatorSetsPredicate where(int... fields) { return new JoinOperatorSetsPredicate(new Keys.FieldPositionKeys<I1>(fields, input1.getType())); }
/** * Continues a CoGroup transformation. <br/> * Defines the {@link Tuple} fields of the first co-grouped {@link DataSet} that should be used as grouping keys.<br/> * <b>Note: Fields can only be selected as grouping keys on Tuple DataSets.</b><br/> * * @param fields The indexes of the Tuple fields of the first co-grouped DataSets that should be used as keys. * @return An incomplete CoGroup transformation. * Call {@link CoGroupOperatorSetsPredicate#equalTo()} to continue the CoGroup. * * @see Tuple * @see DataSet */ public CoGroupOperatorSetsPredicate where(int... fields) { return new CoGroupOperatorSetsPredicate(new Keys.FieldPositionKeys<I1>(fields, input1.getType())); }