Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ private static com.google.cloud.teleport.v2.ValueCaptureType mapValueCaptureType
return com.google.cloud.teleport.v2.ValueCaptureType.OLD_AND_NEW_VALUES;
case NEW_ROW:
return com.google.cloud.teleport.v2.ValueCaptureType.NEW_ROW;
case NEW_ROW_AND_OLD_VALUES:
return com.google.cloud.teleport.v2.ValueCaptureType.NEW_ROW_AND_OLD_VALUES;
Comment on lines +213 to +214

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new capture type NEW_ROW_AND_OLD_VALUES is correctly added to the mapping. However, it is recommended to add a corresponding unit test in WriteDataChangeRecordsToAvroTest.java to verify that this new type is correctly mapped to the Avro equivalent. Currently, the existing tests only cover OLD_AND_NEW_VALUES.

default:
return com.google.cloud.teleport.v2.ValueCaptureType.NEW_VALUES;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"type" : {
"name": "ValueCaptureType",
"type": "enum",
"symbols": ["OLD_AND_NEW_VALUES", "NEW_ROW", "NEW_VALUES"]
"symbols": ["OLD_AND_NEW_VALUES", "NEW_ROW", "NEW_VALUES", "NEW_ROW_AND_OLD_VALUES"]
}
},
{ "name" : "numberOfRecordsInTransaction", "type" : "long"},
Expand Down Expand Up @@ -89,4 +89,4 @@
{"name": "spannerInstanceId", "type": ["null", "string"], "default": null },
{"name": "outputMessageMetadata", "type": ["null", "string"], "default": null }
]
}
}