vrozov commented on code in PR #50611: URL: https://github.com/apache/spark/pull/50611#discussion_r2047776038
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala: ########## @@ -655,3 +655,43 @@ class DriverStatefulProcessorHandleImpl(timeMode: TimeMode, keyExprEnc: Expressi verifyStateVarOperations("delete_if_exists", PRE_INIT) } } + +private[sql] trait DriverSideState { + protected val stateName: String + + protected def throwInitPhaseError(operation: String): Nothing = { + throw StateStoreErrors.cannotPerformOperationWithInvalidHandleState( + s"$stateName.$operation", PRE_INIT.toString) + } +} + +private[sql] class DriverSideValueState[S](override val stateName: String) Review Comment: IMO `DriverSide` naming is confusing, I would expect some driver side functional state based on the name, while the actual implementation is not functional. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org