anishshri-db commented on code in PR #53930:
URL: https://github.com/apache/spark/pull/53930#discussion_r2724979448
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala:
##########
@@ -374,6 +410,36 @@ trait DataEncoder {
*/
def decodePrefixKeyForRangeScan(bytes: Array[Byte]): UnsafeRow
+ /**
+ * Decodes key bytes containing key and event time appended as postfix back
into an UnsafeRow
+ * and event time.
+ *
+ * This method reverses the encoding done by encodeKeyForEventTimeAsPostfix:
+ * - Read the bytes excluding the last 8 bytes as the key UnsafeRow
+ * - Read the last 8 bytes as the event time Long value
+ *
+ * @param bytes Serialized byte array containing the encoded key and event
time
+ * @return UnsafeRow containing the decoded key columns and the event time
Long value
+ * @throws UnsupportedOperationException if called on an encoder that
doesn't support event time
+ * as postfix.
+ */
+ def decodeKeyForEventTimeAsPostfix(bytes: Array[Byte]): (UnsafeRow, Long)
Review Comment:
Same here as above
--
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]