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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:
##########
@@ -316,6 +321,25 @@ class RocksDB(
     }
   }
 
+  def merge(key: Array[Byte], value: Array[Byte],
+            colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME): Unit 
= {
+    verifyColFamilyExists(colFamilyName)
+
+    if (conf.trackTotalNumberOfRows) {
+      val oldValue = db.get(colFamilyNameToHandleMap(colFamilyName), 
readOptions, key)
+      if (oldValue == null) {
+        numKeysOnWritingVersion += 1
+      }
+    }
+    db.merge(colFamilyNameToHandleMap(colFamilyName), writeOptions, key, value)
+
+    if (useColumnFamilies) {
+      changelogWriter.foreach(_.merge(key, value, colFamilyName))
+    } else {
+      changelogWriter.foreach(_.merge(key, value))

Review Comment:
   We want to support this for the non-col-families case too ?



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