Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(common): don't match an Object pattern with more positional arguments defined than __match_args__ has #8124

Merged

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Jan 28, 2024

Turns out one of the patterns were referencing non-existing fields and the Object pattern was still matching on it.

Fixes #8058.

@kszucs kszucs requested a review from jcrist January 28, 2024 14:46
@kszucs kszucs force-pushed the object-pattern-validation branch 2 times, most recently from 440bc4c to 5f73380 Compare January 28, 2024 14:48
@kszucs kszucs changed the title fix(common): don't match an Object pattern with more positional arguments defined than value.__match_args__ has fix(common): don't match an Object pattern with more positional arguments defined than __match_args__ has Jan 28, 2024
ibis/expr/rewrites.py Outdated Show resolved Hide resolved
@kszucs kszucs force-pushed the object-pattern-validation branch from 5f73380 to bb9b235 Compare January 29, 2024 14:52
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small issues with the test case.

ibis/backends/tests/sql/test_compiler.py Outdated Show resolved Hide resolved
ibis/common/patterns.py Outdated Show resolved Hide resolved
ibis/expr/rewrites.py Outdated Show resolved Hide resolved
@kszucs kszucs force-pushed the object-pattern-validation branch from bb9b235 to 1070f0c Compare January 29, 2024 16:06
@kszucs
Copy link
Member Author

kszucs commented Jan 29, 2024

@cpcloud addressed your comments

@kszucs kszucs force-pushed the object-pattern-validation branch from 1070f0c to 81470b1 Compare January 29, 2024 16:12
@cpcloud
Copy link
Member

cpcloud commented Jan 29, 2024

I'm not sure why that job is failing, I thought we moved away from those caching actions.

@cpcloud
Copy link
Member

cpcloud commented Jan 29, 2024

Oh, that's not yet in the-epic-split :(

@cpcloud cpcloud force-pushed the object-pattern-validation branch from 81470b1 to ec974cf Compare February 1, 2024 14:12
@cpcloud cpcloud added bug Incorrect behavior inside of ibis tes-required-for-merge Issues that must addressed before merging the-epic-split branch into main labels Feb 1, 2024
@cpcloud cpcloud added this to the 9.0 milestone Feb 1, 2024
@cpcloud cpcloud enabled auto-merge (rebase) February 1, 2024 14:16
@cpcloud cpcloud merged commit 432d151 into ibis-project:the-epic-split Feb 1, 2024
57 checks passed
@kszucs kszucs deleted the object-pattern-validation branch February 3, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis tes-required-for-merge Issues that must addressed before merging the-epic-split branch into main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants