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(mutate/select): ensure that unsplatted dictionaries work in mutateandselect APIs #8014

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jan 18, 2024

We were not handling unsplatted dicts in mutate/select, this PR fixes that. Fixes #8013.

@cpcloud cpcloud added bug Incorrect behavior inside of ibis tests Issues or PRs related to tests labels Jan 18, 2024
Copy link
Contributor

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

@cpcloud cpcloud changed the title unnest range fix(mutate/select): ensure that unsplatted dictionaries work in muta… …teandselect APIs Jan 18, 2024
@cpcloud cpcloud changed the title fix(mutate/select): ensure that unsplatted dictionaries work in muta… …teandselect APIs fix(mutate/select): ensure that unsplatted dictionaries work in mutateandselect APIs Jan 18, 2024
@cpcloud cpcloud added this to the 8.0 milestone Jan 18, 2024
@cpcloud cpcloud force-pushed the unnest-range branch 2 times, most recently from 6cb933f to faf7cb2 Compare January 18, 2024 17:47
@cpcloud cpcloud requested a review from jcrist January 18, 2024 19:03
Copy link
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

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

Overall concept looks good to me, just a couple code nits/questions.

ibis/expr/types/relations.py Outdated Show resolved Hide resolved

for expr in exprs:
if isinstance(expr, Selector):
new_exprs.extend(expr.expand(self))
Copy link
Member

Choose a reason for hiding this comment

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

_ensure_expr handles selector expansion, I think this case could be dropped and handled by the not-mapping branch below?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately it won't work because expr.expand(self) returns a list and so map(self._ensure_expr, ...) returns an iterable of lists and that isn't supported by Projector.

@cpcloud cpcloud enabled auto-merge (squash) January 18, 2024 20:47
@cpcloud cpcloud merged commit 8ed19ea into ibis-project:main Jan 18, 2024
79 checks passed
@cpcloud cpcloud deleted the unnest-range branch January 18, 2024 20:51
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 tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: incorrect SQL generated on main (but not TES) for generating random numbers
2 participants