Repository navigation
Fix#9041 YAML input list-of-maps reading and null-path failures - #9082
Merged
Merged
Conversation
Signed-off-by: leehaut <leehaut@gmail.com>
Contributor
|
Thanks for yet another great fix @leehaut! This covers all the cases from #9041. I built the plugin and ran the unit tests: all 52 pass, and the 7 new ones fail on main without the fix. I also tried nested wildcards inside list elements, missing fields in one element and empty elements, and they all give the expected rows. I didn't run the sample pipelines. Should fix
|
Signed-off-by: leehaut <leehaut@gmail.com>
Contributor
Author
|
Thanks @bamaer
|
mattcasters
approved these changes
Oct 22, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #9041
YAML Input stopped after the first element of a list of maps, and threw a NullPointerException when a field path matched nothing or when every file was empty and "Ignore empty file" was selected. Labels and tooltips for that transform also described the wrong behavior.
A list of maps is now read to the end.
$.idand$[*].idboth return one row per element. A missing path becomes a null field instead of failing the transform. Skipping empty files walks the file list and finishes normally when nothing remains to read. English and Chinese labels now match this behavior: the result-files label says "filenames", the row-number field is an Integer, and the Required and Ignore empty file tooltips no longer describe wildcard handling or empty files incorrectly.The existing YAML integration tests cover map documents, wildcard paths on a map, plain value lists, multiple documents, and YAML stored in a field. Those paths are unchanged. New unit tests cover a list of maps, a missing path, a single empty file, and an empty file followed by a file with content.
Verification
Ran the three pipelines with the Local Pipeline Engine:
list-of-maps: a list of maps returns Anna, Ben, and Chris (3 rows, 0 errors). A plain list still returns Spark, Flink, and Beam (3 rows, 0 errors).missing-path:$.nopereturns one row,id = 1andmissing = null, and the pipeline finishes with 0 errors.ignore-empty-file: the only file is empty and "Ignore empty file" is selected. The log reports that the file is empty, no rows are written, and the pipeline finishes with no error.Unit tests
YamlReaderTestscovers a list of maps with$.id/$.nameand with$[*].id/$[*].name, and a missing path that becomes null.YamlInputTestscovers the same list of maps and missing path throughprocessRow, plus "Ignore empty file" for one empty file and for an empty file followed by a file with rows.