fixed bug - #2116
Open
niveditasing wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a normalization step for list-like string values in validator_goldens.py to ensure that element sequence does not affect the comparison between input and golden nodes. Feedback suggests removing the condition if ',' in v or v == '[]' to allow single-element lists with inconsistent spacing (e.g., "[ A ]" vs "[A]") to be consistently normalized as well.
balit-raibot
approved these changes
Jul 28, 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.
This PR introduces a normalization step for properties that store list-like string values (e.g., "[A, B]" vs "[B, A]") before performing validation/comparison between input_nodes and golden_nodes.
Why is this change necessary?
During schema validation, certain fields represent multi-valued properties serialized as string-based lists (for example, "[AdministrativeArea, Country]"). The ordering of these elements can vary depending on upstream parsing logic, data source extraction, or database insertion sequence.
Currently, comparing these fields using strict string equality causes tests and validation checks to fail if the elements are ordered differently (e.g., "[B, A]" vs "[A, B]"), even though they are semantically identical.
example - https://storage.mtls.cloud.google.com/datcom-prod-imports/statvar_imports/us_bls/bls_ces_state/BLS_CES_State/2026_07_27T04_54_33_595590_07_00/input0/validation/validation_output.csv