anishshri-db commented on code in PR #47107:
URL: https://github.com/apache/spark/pull/47107#discussion_r1663049045
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreProvider.scala:
##########
@@ -257,10 +299,30 @@ private[sql] class RocksDBStateStoreProvider
/** Return the [[RocksDB]] instance in this store. This is exposed mainly
for testing. */
def dbInstance(): RocksDB = rocksDB
+ // TODO How to avoid memcpy here
+ private def getIdBytes(id: Short): Array[Byte] = {
+ val encodedBytes = new Array[Byte](VIRTUAL_COL_FAMILY_PREFIX_BYTES)
+ Platform.putShort(encodedBytes, Platform.BYTE_ARRAY_OFFSET, id)
+ encodedBytes
+ }
+
/** 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 = {
+ // TODO more efficient way to do remove col family?
Review Comment:
yea - we prob have to do a prefix scan and remove the rows 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]