liviazhu-db commented on code in PR #50045: URL: https://github.com/apache/spark/pull/50045#discussion_r2070521155
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStoreErrors.scala: ########## @@ -435,15 +452,31 @@ class StateStoreFailedToGetChangelogWriter(version: Long, e: Throwable) messageParameters = Map("version" -> version.toString), cause = e) -class StateStoreKeyRowFormatValidationFailure(errorMsg: String) +class StateStoreKeyRowFormatValidationFailure(errorMsg: String, stateStoreID: String) extends SparkRuntimeException( errorClass = "STATE_STORE_KEY_ROW_FORMAT_VALIDATION_FAILURE", - messageParameters = Map("errorMsg" -> errorMsg)) + messageParameters = Map("errorMsg" -> errorMsg, "stateStoreID" -> stateStoreID)) + with ConvertableToCannotLoadStoreError { + override def convertToCannotLoadStoreError(): SparkException = { + new SparkException( + errorClass = "CANNOT_LOAD_STATE_STORE.KEY_ROW_FORMAT_VALIDATION_FAILURE", + messageParameters = Map("errorMsg" -> errorMsg, "stateStoreID" -> stateStoreID), + cause = null) + } + } -class StateStoreValueRowFormatValidationFailure(errorMsg: String) +class StateStoreValueRowFormatValidationFailure(errorMsg: String, stateStoreID: String) extends SparkRuntimeException( errorClass = "STATE_STORE_VALUE_ROW_FORMAT_VALIDATION_FAILURE", - messageParameters = Map("errorMsg" -> errorMsg)) + messageParameters = Map("errorMsg" -> errorMsg, "stateStoreID" -> stateStoreID)) + with ConvertableToCannotLoadStoreError { + override def convertToCannotLoadStoreError(): SparkException = { Review Comment: Done -- 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