f-loris opened a new issue, #39779: URL: https://github.com/apache/beam/issues/39779
### What would you like to happen? ### What would you like to happen? The Spark Structured Streaming (Dataset-based) runner currently rejects any `DoFn` that uses state, uses timers, or is annotated with `@RequiresTimeSortedInput`. `ParDoTranslatorBatch.canTranslate` fails with "States and timers are not supported for the moment", so the entire state and timer surface of the Beam model is unavailable on this runner. The classic RDD-based Spark runner supports batch stateful ParDo, so this is a capability gap between the two Spark runners rather than a limitation of Spark. ### Proposal Translate stateful / timer / time-sorted `ParDo` via `KeyValueGroupedDataset#flatMapSortedGroups`, grouping by key and ordering each group by event time, then drive the `DoFn` per key with `InMemoryStateInternals` and `InMemoryTimerInternals` from `runners-core`. Because batch has no state store to bridge onto — state is a heap object scoped to one key — every Beam state type is already implemented by `InMemoryStateInternals`, so the state categories above can be enabled together rather than incrementally. ### Issue Priority Priority: 2 (default / most feature requests should be filed as P2) ### Issue Components - [ ] Component: Python SDK - [x] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [ ] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [x] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Prism Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
