fix: Show unique valid field names when an invalid one is provided - #24774
Open
nuno-faria wants to merge 1 commit into
Open
fix: Show unique valid field names when an invalid one is provided#24774nuno-faria wants to merge 1 commit into
nuno-faria wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24774 +/- ##
=======================================
Coverage 81.52% 81.52%
=======================================
Files 1123 1123
Lines 405970 405971 +1
Branches 405970 405971 +1
=======================================
+ Hits 330978 330987 +9
+ Misses 55627 55615 -12
- Partials 19365 19369 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kumarUjjawal
left a comment
Contributor
There was a problem hiding this comment.
Thank you @nuno-faria
The fix is correct just the tests need one change.
| drop table a; | ||
|
|
||
|
|
||
| # Test valid fields in a nested query when providing an invalid column name |
Contributor
There was a problem hiding this comment.
the test can pass even if we remove the unique() becuase regex is not anchored to the end, you fix using an exact multiline error expectation, or an escaped and end-anchored regex like Valid fields are t\.x\.$
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.
Which issue does this PR close?
Rationale for this change
Minor fix to show a valid field name only once in the "Valid fields" error message.
What changes are included in this PR?
uniquewhen collecting valid fields for theFieldNotFounderror atnormalize_with_schemas_and_ambiguity_check. Since multiple levels of schema are tested in that function, the same field can appear multiple times.Are these changes tested?
Yes.
Are there any user-facing changes?
No.