anishshri-db commented on code in PR #53583:
URL: https://github.com/apache/spark/pull/53583#discussion_r2696441691
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:
##########
@@ -1022,6 +1022,43 @@ class RocksDB(
}
}
+ /**
+ * Get the values for multiple keys in a single batch operation.
+ * Uses RocksDB's native multiGet for efficient batch lookups.
+ *
+ * @param keys Array of keys to look up
+ * @param cfName The column family name
+ * @return Array of values corresponding to the keys (null for keys that
don't exist)
+ */
+ def multiGet(
+ keys: Array[Array[Byte]],
+ cfName: String = StateStore.DEFAULT_COL_FAMILY_NAME):
Iterator[Array[Byte]] = {
+ updateMemoryUsageIfNeeded()
+ // Prepare keys
+ val finalKeys = if (useColumnFamilies) {
+ keys.map(encodeStateRowWithPrefix(_, cfName))
Review Comment:
nit: indent needs to be fixed ?
--
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]