HeartSaVioR commented on code in PR #50611: URL: https://github.com/apache/spark/pull/50611#discussion_r2047813780
########## 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: @ericm-db Shall we rename it to represent `InvalidHandle` since you represented this as `InvalidHandle` in error method name? E.g. rename trait to `InvalidHandleState` and so on. -- 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