Tanishq-Choudhary opened a new pull request, #41533:
URL: https://github.com/apache/beam/pull/41533

   Fixes #41532
   
   `YamlUtils.toBeamValue` returned MAP values as SnakeYAML parsed them. A 
`map<str, str>` field like `consumer_config_updates` or `catalog_properties` 
with an unquoted number or boolean then failed in `Row.Builder.build()` with a 
ClassCastException, which Managed wraps as "Encountered an error when 
retrieving a configuration".
   
   This converts each key and value with the map's key and value types, like 
the List and ROW branches already do. Nested rows and lists inside map values 
now go through the same conversion. A null value for a non-nullable value type 
now fails with the usual "Received null value for non-nullable field" message.
   
   Tests:
   - New `YamlUtilsTest.testMapValuesAreConvertedToSchemaType` fails on master 
with `ClassCastException: Boolean cannot be cast to String` and passes with the 
fix.
   - `:sdks:java:core:test --tests YamlUtilsTest` (18/18) and 
`:sdks:java:managed:test` (13/13) pass.
   - The Kafka repro from the issue (Managed.read with `max.poll.records: 500`) 
fails on master and passes with the fix. The Kafka schema transform provider 
and translation tests pass too.
   
   CHANGES.md is updated under Bugfixes.


-- 
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]

  • [PR] Convert YAML map values t... Tanishq-Choudhary (via GitHub) via github

Reply via email to