You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ericm-db (via GitHub)" <gi...@apache.org> on 2025/01/02 21:48:49 UTC

Re: [PR] [SPARK-50655][SS] Move virtual col family related mapping into db layer instead of encoder [spark]

ericm-db commented on code in PR #49304:
URL: https://github.com/apache/spark/pull/49304#discussion_r1901289015


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:
##########
@@ -473,23 +487,35 @@ class RocksDB(
   private def openLocalRocksDB(metadata: RocksDBCheckpointMetadata): Unit = {
     setInitialCFInfo()
     metadata.columnFamilyMapping.foreach { mapping =>
-      colFamilyNameToIdMap.putAll(mapping.asJava)
+      mapping.foreach { case (colFamilyName, colFamilyInfo) =>
+        colFamilyNameToInfoMap.putIfAbsent(colFamilyName, colFamilyInfo)

Review Comment:
   I think we should make a private helper function that updates both of these maps at once



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org