jingz-db commented on code in PR #45341:
URL: https://github.com/apache/spark/pull/45341#discussion_r1511697862


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala:
##########
@@ -29,6 +29,14 @@ sealed trait RocksDBKeyStateEncoder {
   def extractPrefixKey(key: UnsafeRow): UnsafeRow
   def encodeKey(row: UnsafeRow): Array[Byte]
   def decodeKey(keyBytes: Array[Byte]): UnsafeRow
+
+  def encodeCompositeKey(groupingKeyRow: UnsafeRow, userKeyRow: UnsafeRow): 
Array[Byte] = {

Review Comment:
   We can also change the key schema - let key schema column 1 = grouping key, 
column 2 = user key, and pass this new key schema to 
`PrefixKeyScanStateEncoder`, and remove all these compositeKey interfaces.



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

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


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

Reply via email to