ibis icon indicating copy to clipboard operation
ibis copied to clipboard

feat(api): improve map()

Open NickCrews opened this issue 1 year ago • 1 comments

works towards https://github.com/ibis-project/ibis/issues/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

NickCrews avatar Jun 27 '24 19:06 NickCrews

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.

github-actions[bot] avatar Jun 27 '24 19:06 github-actions[bot]

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.

cpcloud avatar Jul 23 '24 13:07 cpcloud

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

NickCrews avatar Jul 23 '24 19:07 NickCrews