You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7eb22c
Browse filesBrowse the repository at this point in the historyBrowse files
Add ApproximateCreationDateTimePrecision to DynamoDB StreamRecord
DynamoDB Streams includes an ApproximateCreationDateTimePrecision field
on each stream record when a table has an explicit precision configured
on its stream. The events model StreamRecord did not expose this field,
so the value was silently dropped, and consumers whose ObjectMapper is
configured to fail on unknown properties saw deserialization errors.
Add the field to StreamRecord with the standard getter/setter/with
accessors and include it in toString/equals/hashCode, and map the
PascalCase JSON key in the serialization mixin so it deserializes. The
regression assertion in the shared stream-record check verifies the
value is now parsed.
Fixes#543
Crew: Butterfly (Kiro Crew Issue Radar)
Copy file name to clipboardExpand all lines: aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/models/dynamodb/StreamRecord.java
+55Lines changed: 55 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,14 @@ public class StreamRecord implements Serializable, Cloneable {
31
31
* </p>
32
32
*/
33
33
privatejava.util.DateapproximateCreationDateTime;
34
+
/**
35
+
* <p>
36
+
* The precision of the approximate date and time when the stream record was created. Present when the DynamoDB
37
+
* table has an explicit <code>ApproximateCreationDateTimePrecision</code> set on its stream. Possible values are
38
+
* <code>MILLISECOND</code> and <code>MICROSECOND</code>.
Copy file name to clipboardExpand all lines: aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/DynamodbEventMixin.java
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,9 @@ public abstract class StreamRecordMixin {
48
48
// needed because Jackson expects "approximateCreationDateTime" instead of "ApproximateCreationDateTime"
0 commit comments