anishshri-db commented on code in PR #47445:
URL: https://github.com/apache/spark/pull/47445#discussion_r1687290476
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala:
##########
@@ -382,12 +388,46 @@ case class TransformWithStateExec(
batchId: Long,
stateSchemaVersion: Int): List[StateSchemaValidationResult] = {
assert(stateSchemaVersion >= 3)
- val newColumnFamilySchemas = getColFamilySchemas()
+ val newSchemas = getColFamilySchemas()
val stateSchemaDir = stateSchemaDirPath()
- val stateSchemaFilePath = new Path(stateSchemaDir,
s"${batchId}_${UUID.randomUUID().toString}")
-
List(StateSchemaCompatibilityChecker.validateAndMaybeEvolveStateSchema(getStateInfo,
hadoopConf,
- newColumnFamilySchemas.values.toList, session.sessionState,
stateSchemaVersion,
- schemaFilePath = Some(stateSchemaFilePath)))
+ val newStateSchemaFilePath =
+ new Path(stateSchemaDir, s"${batchId}_${UUID.randomUUID().toString}")
+ val metadataPath = new Path(getStateInfo.checkpointLocation,
s"${getStateInfo.operatorId}")
+ val metadataReader = new OperatorStateMetadataV2Reader(metadataPath,
hadoopConf)
Review Comment:
We can just pass the required version and get the correct reader ?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]