anishshri-db commented on code in PR #43961:
URL: https://github.com/apache/spark/pull/43961#discussion_r1432080835
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStoreChangelog.scala:
##########
@@ -33,12 +33,20 @@ import
org.apache.spark.sql.execution.streaming.CheckpointFileManager.Cancellabl
import org.apache.spark.util.NextIterator
/**
- * Write changes to the key value state store instance to a changelog file.
- * There are 2 types of records, put and delete.
- * A put record is written as: | key length | key content | value length |
value content |
- * A delete record is written as: | key length | key content | -1 |
- * Write an Int -1 to signal the end of file.
- * The overall changelog format is: | put record | delete record | ... | put
record | -1 |
+ * Enum used to write record types to changelog files used with
RocksDBStateStoreProvider.
+ */
+object RecordType extends Enumeration {
+ type RecordType = Value
+
+ val PUT_RECORD = Value("put_record")
Review Comment:
I still kept the `enum` rather than passing strings around - just for the
in-memory representation. Lmk if you still have a strong pref towards removing
this
--
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]