@Override public UnaryOperatorInformation<OUT, OUT> getOperatorInfo() { TypeInformation<OUT> previousOut = input.getOperatorInfo().getOutputType(); return new UnaryOperatorInformation<OUT, OUT>(previousOut, previousOut); }
public Union(Operator<T> input1, Operator<T> input2, String unionLocationName) { this(new BinaryOperatorInformation<T, T, T>(input1.getOperatorInfo().getOutputType(), input1.getOperatorInfo().getOutputType(), input1.getOperatorInfo().getOutputType()), unionLocationName); setFirstInput(input1); setSecondInput(input2); }
@Override public Path get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return get(); } }
protected Ordering getGroupOrdering() { Ordering o = new Ordering(); for (int i = 0; i < this.groupSortKeyPositions.length; i++) { o.appendOrdering(this.groupSortKeyPositions[i], null, this.groupSortOrders[i]); } return o; }
public PlanUnwrappingGroupCombineOperator(GroupCombineFunction<IN, OUT> udf, Keys.SelectorFunctionKeys<IN, K> key, String name, TypeInformation<OUT> outType, TypeInformation<Tuple2<K, IN>> typeInfoWithKey) { super(new TupleUnwrappingGroupCombiner<IN, OUT, K>(udf), new UnaryOperatorInformation<Tuple2<K, IN>, OUT>(typeInfoWithKey, outType), key.computeLogicalKeyPositions(), name); }
@Test public void testAreCompatible3() throws Keys.IncompatibleKeysException { TypeInformation<String> t1 = BasicTypeInfo.STRING_TYPE_INFO; TypeInformation<Pojo2> t2 = TypeExtractor.getForClass(Pojo2.class); Keys.ExpressionKeys<String> ek1 = new Keys.ExpressionKeys<>("*", t1); Keys<Pojo2> sk2 = new Keys.SelectorFunctionKeys<>( new KeySelector1(), t2, BasicTypeInfo.STRING_TYPE_INFO ); Assert.assertTrue(sk2.areCompatible(ek1)); }
@Test(expected = IndexOutOfBoundsException.class) public void testAllForwardedSingleInputSemPropsInvalidIndex2() { SingleInputSemanticProperties sp = new SingleInputSemanticProperties.AllFieldsForwardedProperties(); sp.getForwardingTargetFields(1, 0); } }
private int[] getAllFlatKeys(int[] fieldPositions) { Keys.ExpressionKeys<T> ek = new Keys.ExpressionKeys<>(fieldPositions, this.type); return ek.computeLogicalKeyPositions(); }
@Override public SemanticProperties getSemanticProperties() { return new SingleInputSemanticProperties.AllFieldsForwardedProperties(); }
/** * @param index * @param type * @param order */ public Ordering(int index, Class<? extends Comparable<?>> type, Order order) { appendOrdering(index, type, order); }
@Test(expected = IndexOutOfBoundsException.class) public void testAllForwardedSingleInputSemPropsInvalidIndex1() { SingleInputSemanticProperties sp = new SingleInputSemanticProperties.AllFieldsForwardedProperties(); sp.getForwardingSourceField(1, 0); }
@Override public SemanticProperties getSemanticProperties() { return new EmptySemanticProperties(); }
/** * Returns the BinaryNodeTranslation of the Union. * * @param input1 The first input of the union, as a common API operator. * @param input2 The second input of the union, as a common API operator. * @return The common API union operator. */ @Override protected Union<T> translateToDataFlow(Operator<T> input1, Operator<T> input2) { return new Union<T>(input1, input2, unionLocationName); }
public ResourceSpec build() { return new ResourceSpec( cpuCores, heapMemoryInMB, directMemoryInMB, nativeMemoryInMB, stateSizeInMB, gpuResource); } }
/** * Traverses the job depth first from all data sinks on towards the sources. * * @see Visitable#accept(Visitor) */ @Override public void accept(Visitor<Operator<?>> visitor) { for (GenericDataSinkBase<?> sink : this.sinks) { sink.accept(visitor); } }
/** * Takes a list of operators and creates a cascade of unions of this inputs, if needed. * If not needed (there was only one operator in the list), then that operator is returned. * * @param operators The operators. * @return The single operator or a cascade of unions of the operators. */ public static <T> Operator<T> createUnionCascade(Operator<T>... operators) { return createUnionCascade(null, operators); }
@Override public SemanticProperties getSemanticProperties() { return new SingleInputSemanticProperties.AllFieldsForwardedProperties(); }
@Override public SemanticProperties getSemanticProperties() { return new EmptySemanticProperties(); }
@Override public SingleInputSemanticProperties getSemanticProperties() { return new SingleInputSemanticProperties.AllFieldsForwardedProperties(); }
@Override public SingleInputSemanticProperties getSemanticProperties() { return new SingleInputSemanticProperties.AllFieldsForwardedProperties(); }