use of org.apache.beam.sdk.coders.NullableCoder in project beam by apache.
the class LatestTest method testGloballyOutputCoder.
@Test
public void testGloballyOutputCoder() {
p.enableAbandonedNodeEnforcement(false);
BigEndianLongCoder inputCoder = BigEndianLongCoder.of();
PCollection<Long> output = p.apply(Create.of(1L, 2L).withCoder(inputCoder)).apply(Latest.globally());
Coder<Long> outputCoder = output.getCoder();
assertThat(outputCoder, instanceOf(NullableCoder.class));
assertEquals(inputCoder, ((NullableCoder<?>) outputCoder).getValueCoder());
}
Aggregations