lukecwik commented on a change in pull request #11808:
URL: https://github.com/apache/beam/pull/11808#discussion_r445207524
##########
File path:
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/ParDoTranslation.java
##########
@@ -739,7 +737,9 @@ private static ParDoPayload
getParDoPayload(RunnerApi.PTransform parDoPTransform
public static boolean usesStateOrTimers(AppliedPTransform<?, ?, ?>
transform) throws IOException {
ParDoPayload payload = getParDoPayload(transform);
- return payload.getStateSpecsCount() > 0 ||
payload.getTimerFamilySpecsCount() > 0;
+ return payload.getStateSpecsCount() > 0
+ || payload.getTimerFamilySpecsCount() > 0
+ || payload.getRequiresTimeSortedInput();
Review comment:
I think modelling how something is executed and making that separate
from what the users definition of their transform is important (so using the
PTransformMatcher makes a lot of sense since not all runners will use state).
For example, a runner can sort using their shuffle implementation where the
timestamp is the sort key (this is something that Dataflow does for some batch
pipelines) and other runners may choose to do this as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]