anishshri-db commented on code in PR #47336:
URL: https://github.com/apache/spark/pull/47336#discussion_r1677327207


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBFileManager.scala:
##########
@@ -193,11 +208,18 @@ class RocksDBFileManager(
       version: Long,
       useColumnFamilies: Boolean = false): StateStoreChangelogReader = {
     val changelogFile = dfsChangelogFile(version)
-    if (useColumnFamilies) {
-      new StateStoreChangelogReaderV2(fm, changelogFile, codec)
-    } else {
-      new StateStoreChangelogReaderV1(fm, changelogFile, codec)
+
+    val changelogVersion = getChangelogVersion(useColumnFamilies)

Review Comment:
   Yea - since we don't have for v1 - just rely on external args here and then 
verifying that we are reading the right decided/expected version. Added a note 
in the code as well.



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBFileManager.scala:
##########
@@ -193,11 +208,18 @@ class RocksDBFileManager(
       version: Long,
       useColumnFamilies: Boolean = false): StateStoreChangelogReader = {
     val changelogFile = dfsChangelogFile(version)
-    if (useColumnFamilies) {
-      new StateStoreChangelogReaderV2(fm, changelogFile, codec)
-    } else {
-      new StateStoreChangelogReaderV1(fm, changelogFile, codec)
+
+    val changelogVersion = getChangelogVersion(useColumnFamilies)

Review Comment:
   Yea - since we don't have version info for v1 - just rely on external args 
here and then verifying that we are reading the right decided/expected version. 
Added a note in the code as well.



-- 
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]

Reply via email to