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

feat(api): improve map() #9459

Closed
wants to merge 1 commit into from
Closed

Conversation

NickCrews
Copy link
Contributor

@NickCrews NickCrews commented Jun 27, 2024

works towards #8289

depends on the new array API of #9458

One this is adding support for passing in None.
These use the new ibis.null(<type>) API to return op.Literal(None, <type>)s

Also, now map() is idempotent: you can
pass in existing Expressions into map().
The type argument for all of these now always has an effect, not just when passing in python literals. So basically it acts like a cast if the argument is already an expression.

You can test this locally with eg
pytest -m <backend> -k factory ibis/backends/tests/test_map.py

works towards ibis-project#8289

One this is adding support for passing in None.
These use the new `ibis.null(<type>)` API to return `op.Literal(None, <type>)`s

Also, now map() is idempotent: you can
pass in existing Expressions into map().
The type argument for all of these now always has an effect, not just when passing in python literals. So basically it acts like a cast if the argument is already an expression.

You can test this locally with eg
`pytest -m <backend> -k factory   ibis/backends/tests/test_map.py`
@NickCrews NickCrews changed the title feat: Improve map() feat(api): Improve map() Jun 27, 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.

@NickCrews NickCrews changed the title feat(api): Improve map() feat(api): improve map() Jun 27, 2024
@cpcloud
Copy link
Member

cpcloud commented Jul 23, 2024

I would like to close out the Map, Array and Struct API improvement PRs and start over with just one of them, with a very specific use case that doesn't work, and try to address that incrementally. These PRs are all interdependent and stuffed full of hugely-consequential API changes.

@NickCrews
Copy link
Contributor Author

sounds good, let's start with array for now.

@NickCrews NickCrews closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants