Skip to content

Commit

Permalink
[FLINK-20897][streaming-java] Make boundedness mutable in LegacySourc…
Browse files Browse the repository at this point in the history
…eTransformation

InputFormat, SourceFunction, and DataStream API are exposed via table source runtime
providers that might not set the boundedness correctly. However, the table planner has
the correct information and needs a way to enrich these transformations. The new source
stack will set this property correctly.
  • Loading branch information
twalthr committed Aug 13, 2021
1 parent 6353f62 commit 21df58a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class LegacySourceTransformation<T> extends PhysicalTransformation<T>

private final StreamOperatorFactory<T> operatorFactory;

private final Boundedness boundedness;
private Boundedness boundedness;

/**
* Creates a new {@code LegacySourceTransformation} from the given operator.
Expand Down Expand Up @@ -77,6 +77,11 @@ public LegacySourceTransformation(
this.boundedness = checkNotNull(boundedness);
}

/** Mutable for legacy sources in the Table API. */
public void setBoundedness(Boundedness boundedness) {
this.boundedness = boundedness;
}

@Override
public Boundedness getBoundedness() {
return boundedness;
Expand Down

0 comments on commit 21df58a

Please sign in to comment.