-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(rust, python): building blocks for expression expansion sets #9231
Conversation
Awesome; will integrate into the the python-side selector proxy. (Should also allow for first/last inversion... :) |
This covers df.select( (s.ends_with("_usd") | s.string()) ) Also... maybe rename as Correction: Oops, no, df.select( (s.ends_with("_usd") & s.string()) ) |
Will take a look. That's a bit more complicated as we don't have the schema yet. |
What do you mean? EDIT: The proxy should dispatch the proper python overload to this one. |
Yup, and it will - I just mean that purely from a naming perspective add/sub refer to the operators "+" and "-" on the python side (dunder methods), whereas the appropriate operators for logical unions of the selectors would be "&" (when/if available), "|", and "~". So not a functional issue, just naming-alignment; if it makes more sense as add/sub on the Rust side then it's not a big deal ;) |
I see that |
By itself it isn't, but by construction |
Right, but that assumes that It gets philosophical ^^ |
Well, I can experiment accordingly ;) |
Yes, the |
Will try to follow up with an |
This is not intended for external usage, but this provides the building blocks that allow us to implement selection unions.
With this @alexander-beedie's new selector API can implement:
This exposes a
meta._as_selector()
expression, which creates a state:where the
add
andsubtract
can hold expanding expressions.The
Expr::Selector
can do UNION ADD with_selector_add
and UNION SUBTRACT with_selector_sub
.example: