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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreProvider.scala:
##########
@@ -261,7 +313,21 @@ private[sql] class RocksDBStateStoreProvider
     /** Remove column family if exists */
     override def removeColFamilyIfExists(colFamilyName: String): Boolean = {
       verify(useColumnFamilies, "Column families are not supported in this 
store")
-      val result = rocksDB.removeColFamilyIfExists(colFamilyName)
+      val result = {
+        val colFamilyExists = 
ColumnFamilyUtils.checkColFamilyExists(colFamilyName)
+        if (colFamilyExists) {
+          ColumnFamilyUtils.verifyColFamilyOperations("prefixScan", 
colFamilyName)
+          val idPrefix = ColumnFamilyUtils.getVcfIdBytes(
+            colFamilyNameToIdMap.get(colFamilyName)
+          )
+          rocksDB.prefixScan(idPrefix).foreach { kv =>
+            ColumnFamilyUtils.verifyColFamilyOperations("remove", 
colFamilyName)

Review Comment:
   yea +1 - i think we don't need this here ?



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