lostluck commented on code in PR #33350:
URL: https://github.com/apache/beam/pull/33350#discussion_r1889048648
##########
sdks/go/pkg/beam/runners/prism/internal/engine/data.go:
##########
@@ -220,3 +228,95 @@ func (d *TentativeData) ClearMultimapKeysState(stateID
LinkID, wKey, uKey []byte
kmap[string(uKey)] = StateData{}
slog.Debug("State() MultimapKeys.Clear", slog.Any("StateID", stateID),
slog.Any("UserKey", uKey), slog.Any("WindowKey", wKey))
}
+
+// OrderedListState from the Java SDK is encoded as KVs with varint encoded
millis
+// followed by the value. This is *not* the standard TimestampValueCoder
encoding, which
+// uses a big-endian long as a suffix to the value.
+//
+// Next, is we need to parse out the individual values from the data blob
anyway.
+// So we probably can't cheekily re-use the BagState like it currently is, even
+// after fixing the timestamp issue.
+//
+// Currently assuming the Value is length prefixed, which isn't always going to
+// be true for ints, bools, bytes, and other "known" coders.s
Review Comment:
Re-written and moved to inside the Append function, since that's the only
place it needs to apply.
Good catch.
--
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]