Repository navigation
fix(data-quality): tableColumnToMatchSet ordered="false" treated as True (#35616) - #35663
harshsoni2024 merged 4 commits into
Conversation
… in tableColumnToMatchSet bool(\"false\") returns True in Python because any non-empty string is truthy. tableColumnToMatchSet was calling get_test_case_param_value(..., bool, default=False) for the \"ordered\" parameter, meaning ordered=\"false\" / \"False\" / \"0\" were all treated as ordered=True. Only omitting the parameter entirely produced unordered matching. Switch to get_bool_test_case_param, which already exists in validations/utils.py and does str.lower() == \"true\", so \"false\"/\"False\"/\"0\" correctly yield False. Added regression fixtures and test cases in both the SQLite (database) and DataFrame (datalake) test paths: - test_case_column_to_match_set_ordered_false: all 11 table columns in shuffled order + ordered=\"false\" — expects Success (unordered match) rather than the False-before-fix ordered comparison that would produce Failure. Fixes open-metadata#35616 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
…se fixture The SQLAlchemy tableColumnToMatchSet validator reports ORM column keys, so the users table's "first name" column comes back as "first_name" and the shared fixture never matched. Give the database test its own fixture; the datalake test keeps the original one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed fed33d8 to fix the The SQLAlchemy The database test now uses its own fixture, (Prepared with AI assistance (Claude Code, Anthropic), reviewed for correctness before submission.) |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved🟡 Medium risk · Correcting unordered column checks and normalizing patch operations affect validation results and entity updates, which could change detected quality failures or persisted metadata. Switches the VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
fd04bd8



Why
bool("false")returnsTruein Python — any non-empty string is truthy.tableColumnToMatchSet._run_validationwas reading theorderedparameter withget_test_case_param_value(..., bool, default=False), so passingordered: "false","False"or"0"all silently enabled ordered matching. The only way to get unordered comparison was to omit the parameter entirely.What changed
Switched from
get_test_case_param_value(..., bool)to the existingget_bool_test_case_paramhelper (invalidations/utils.py) which doesstr.lower() == "true", so every falsy string variant correctly yieldsFalse.No other files changed.
Tests
Added
test_case_column_to_match_set_ordered_falsefixture and parametrized test cases in both the SQLite (database) and DataFrame (datalake) test paths:"false"True(ordered)False(unordered) ✓"False"TrueFalse✓"true"TrueTrue✓FalseFalse✓The new
ordered_falsetest lists all 11 table columns in shuffled order (different from DDL order) and expectsSuccess, which would have beenFailedwith the old code because ordered comparison would have seen a mismatched sequence.Fixes #35616
Prepared with AI assistance (Claude Code, Anthropic), reviewed for correctness before submission.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Fixes
tableColumnToMatchSetsoordered="false"uses unordered matching.ordered: "false"as unordered matching.No new actionable issues found. Tests were not run.
Reviews (3) · Last reviewed commit: "test(data-quality): use ORM column keys ..." · Reviewed by Greptile
Summary by Gitar
patch.patchto a list inbuild_patchbefore array fields are appended inpatch_request.pyThis will update automatically on new commits.