HeartSaVioR commented on code in PR #53911:
URL: https://github.com/apache/spark/pull/53911#discussion_r2725994897
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateEncoder.scala:
##########
@@ -48,6 +48,9 @@ sealed trait RocksDBKeyStateEncoder {
def encodePrefixKey(prefixKey: UnsafeRow): Array[Byte]
def encodeKey(row: UnsafeRow): Array[Byte]
def decodeKey(keyBytes: Array[Byte]): UnsafeRow
+ def supportEventTime: Boolean
Review Comment:
We could, but that's just like checking boolean vs pattern matching to check
the type, and use whole different methods based on the result of if-statement.
I can still do the thing to avoid existing encoder to force implementing new
methods, if it's preferable.
IMHO they are naturally different ones, though I had to add them here
because the abstraction of KeyStateEncoder is used widespread and I can't
easily expand to receive another kind of it.
--
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]