DataSet<Tuple2<String, String>> joinDs = ds1.join(ds2) .where(1) .equalTo(1) .with(new T3T5Join()); DataSet<Tuple2<String, String>> joinDs = ds1.join(ds2) .where(0,1) .equalTo(0,4) .with(new T3T5Join()); DataSet<Tuple2<Tuple3<Integer, Long, String>,Tuple5<Integer, Long, Integer, String, Long>>> joinDs = ds1.join(ds2) .where(0) .equalTo(2); DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.get5TupleDataSet(env); DataSet<Tuple2<String, String>> joinDs = ds1.joinWithHuge(ds2) .where(1) .equalTo(1) .with(new T3T5Join()); DataSet<Tuple2<String, String>> joinDs = ds1.joinWithTiny(ds2) .where(1) .equalTo(1) .with(new T3T5Join());
.where(0).equalTo(0) .projectFirst(1).projectSecond(1,2) .types(Integer.class, Double.class, Double.class); .where(3).equalTo(0) .projectFirst(0,1,2).projectSecond(1).projectFirst(4) .types(Integer.class, String.class, String.class, String.class, Double.class); .where(0).equalTo(0) .projectFirst(0,1,2,3,4).projectSecond(1) .types(Integer.class, String.class, String.class, String.class, Double.class, Double.class);
.where(0).equalTo(0) .projectFirst(1).projectSecond(1,2) .types(Integer.class, Double.class, Double.class); .where(3).equalTo(0) .projectFirst(0,1,2).projectSecond(1).projectFirst(4) .types(Integer.class, String.class, String.class, String.class, Double.class); .where(0).equalTo(0) .projectFirst(0,1,2,3,4).projectSecond(1) .types(Integer.class, String.class, String.class, String.class, Double.class, Double.class);
.where(0).equalTo(0) .projectFirst(0,1).projectSecond(1) .types(Integer.class, Integer.class, Double.class);
.where(0).equalTo(0) .projectFirst(0,1).projectSecond(1) .types(Integer.class, Integer.class, Double.class);
.where(0).equalTo(1) .projectSecond(0,1,2) .types(Integer.class, String.class, Integer.class);
.where(0).equalTo(1) .projectSecond(0,1,2) .types(Integer.class, String.class, Integer.class);
.join(edgesById).where(Triad.V2,Triad.V3).equalTo(Edge.V1,Edge.V2).with(new TriadFilter());
.join(edgesById).where(Triad.V2,Triad.V3).equalTo(Edge.V1,Edge.V2).with(new TriadFilter());
initialSolutionSet.iterateDelta(initialSolutionSet, MAX_ITERATIONS, keyPosition); DataSet<Long> candidates = iteration.getWorkset().join(edges).where(0).equalTo(0) .with(new FindCandidatesJoin()) .groupBy(new KeySelector<Long, Long>() { .where(new KeySelector<Long, Long>() { public Long getKey(Long id) { return id; } }).equalTo(new KeySelector<Tuple2<Long, Long>, Long>() { candidatesDependencies.join(iteration.getSolutionSet()).where(0).equalTo(0) .with(new NeighborWithComponentIDJoin()) .groupBy(0).reduceGroup(new MinimumReduce()); verticesWithNewComponents.join(iteration.getSolutionSet()).where(0).equalTo(0) .flatMap(new MinimumIdFilter());
.join(edgesById).where(Triad.V2, Triad.V3).equalTo(Edge.V1, Edge.V2).with(new TriadFilter());
/** * Initiates a Join transformation.<br/> * A Join transformation joins the elements of two * {@link DataSet DataSets} on key equality and provides multiple ways to combine * joining elements into one DataSet.</br> * This method also gives the hint to the optimizer that the second DataSet to join is much * larger than the first one.</br> * This method returns a {@link JoinOperatorSets JoinOperatorSet} on which * {@link JoinOperatorSets#where()} needs to be called to define the join key of the first * joining (i.e., this) DataSet. * * @param other The other DataSet with which this DataSet is joined. * @return A JoinOperatorSet to continue the definition of the Join transformation. * * @see JoinOperatorSets * @see JoinOperator * @see DataSet */ public <R> JoinOperatorSets<T, R> joinWithHuge(DataSet<R> other) { return new JoinOperatorSets<T, R>(this, other, JoinHint.BROADCAST_HASH_FIRST); }
/** * Initiates a Join transformation. <br/> * A Join transformation joins the elements of two * {@link DataSet DataSets} on key equality and provides multiple ways to combine * joining elements into one DataSet.</br> * This method also gives the hint to the optimizer that the second DataSet to join is much * smaller than the first one.</br> * This method returns a {@link JoinOperatorSets} on which * {@link JoinOperatorSets#where()} needs to be called to define the join key of the first * joining (i.e., this) DataSet. * * @param other The other DataSet with which this DataSet is joined. * @return A JoinOperatorSets to continue the definition of the Join transformation. * * @see JoinOperatorSets * @see JoinOperator * @see DataSet */ public <R> JoinOperatorSets<T, R> joinWithTiny(DataSet<R> other) { return new JoinOperatorSets<T, R>(this, other, JoinHint.BROADCAST_HASH_SECOND); }
/** * Initiates a Join transformation. <br/> * A Join transformation joins the elements of two * {@link DataSet DataSets} on key equality and provides multiple ways to combine * joining elements into one DataSet.</br> * * This method returns a {@link JoinOperatorSets} on which * {@link JoinOperatorSets#where()} needs to be called to define the join key of the first * joining (i.e., this) DataSet. * * @param other The other DataSet with which this DataSet is joined. * @return A JoinOperatorSets to continue the definition of the Join transformation. * * @see JoinOperatorSets * @see JoinOperator * @see DataSet */ public <R> JoinOperatorSets<T, R> join(DataSet<R> other) { return new JoinOperatorSets<T, R>(this, other); }