-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of duplicate normalized field names in sink (#2610)
* Add test to confirm various working cases of duplicate normalized field combinations * Add test to reproduce #2609 * Don't try to expand map values again for duplicate normalized field names * Merge tests * Update comment * Modify input example to show which values are overwritten
- Loading branch information
Showing
6 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...c/test/resources/testdata/payload-format-duplicate-normalized-field-names-expected.ndjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{"additional_properties":{},"payload":{"test_int":-2}} | ||
{"additional_properties":{},"payload":{"test_int":-2}} | ||
{"additional_properties":{},"test_repeated_record":[{"field":"value"}],"test_record":{"key":"value"}} | ||
{"additional_properties":{},"test_repeated_record":[{"field":"value"}],"test_record":{"key":"value"}} | ||
{"additional_properties":{"test_repeated_record":[{},{"reject":"value","alsoReject":null},{}]},"test_repeated_record":[{"field":"value"},{},{}]} | ||
{"additional_properties":{},"test_repeated_tuple":[{"f0_":"string","f1_":5,"f2_":true}]} | ||
{"additional_properties":{},"test_repeated_tuple":[{"f0_":"string","f1_":5,"f2_":true}]} | ||
{"additional_properties":{},"test_tuple":{"f0_":"string","f1_":5,"f2_":true}} | ||
{"additional_properties":{},"test_tuple":{"f0_":"string","f1_":5,"f2_":true}} | ||
{"additional_properties":{},"test_map":[{"key":"key","value":"value"}]} |
10 changes: 10 additions & 0 deletions
10
.../src/test/resources/testdata/payload-format-duplicate-normalized-field-names-input.ndjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{"attributeMap":{"document_namespace":"namespace_0","document_type":"bar","document_version":"1"},"payload":{"payload":{"test_int":-3, "test.int":-2}}} | ||
{"attributeMap":{"document_namespace":"namespace_0","document_type":"bar","document_version":"1"},"payload":{"payload":{"test.int":-2, "test_int":-3}}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test_repeated_record":[{"field":"lost_value"}],"test.repeated_record":[{"field":"value"}],"test_record":{"key":"lost_value"},"test.record":{"key":"value"}}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test.repeated_record":[{"field":"value"}],"test_repeated_record":[{"field":"lost_value"}],"test.record":{"key":"value"},"test_record":{"key":"lost_value"}}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test_repeated_record":[{"field":"value"},{"reject":"value","alsoReject":null},{"field":null}]}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test_repeated_tuple":[["string",4,true]],"test.repeated_tuple":[["string",5,true]]}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test.repeated_tuple":[["string",5,true]],"test_repeated_tuple":[["string",4,true]]}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test_tuple":["string",4,true],"test.tuple":["string",5,true]}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test.tuple":["string",5,true],"test_tuple":["string",4,true]}} | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test_map":{"key":"lost_value"},"test.map":{"key":"value"}}} |
1 change: 1 addition & 0 deletions
1
...src/test/resources/testdata/payload-format-duplicate-normalized-map-field-expected.ndjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"additional_properties":{},"test_map":[{"key":"key","value":"value"}]} |
1 change: 1 addition & 0 deletions
1
...re/src/test/resources/testdata/payload-format-duplicate-normalized-map-field-input.ndjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"attributeMap":{"document_namespace":"live-sink","document_type":"test","document_version":"1"},"payload":{"test.map":{"key":"value"},"test_map":{"key":"lost_value"}}} |