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(duckdb): workaround remaining null map issues #8985

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Apr 17, 2024

Closes #8632.

Note that of the backends that support nullable maps, DuckDB is the only one whose NULL handling semantics differ.

Other backends that support nullable maps and are implemented in Ibis and tested in CI:

  • Postgres (only maps of string -> string via the postgres hstore extension)
  • PySpark
  • Snowflake
  • Trino

BREAKING CHANGE: Calling the get or contains method on NULL map values now returns NULL. Use coalesce(map.get(...), default) or coalesce(map.contains(), False) to get the previous behavior.

@cpcloud cpcloud added this to the 9.0 milestone Apr 17, 2024
@cpcloud cpcloud added bug Incorrect behavior inside of ibis duckdb The DuckDB backend labels Apr 17, 2024
@cpcloud cpcloud requested a review from gforsyth April 17, 2024 11:31
@cpcloud cpcloud force-pushed the more-null-map-workarounds branch 3 times, most recently from 1894fb1 to a81bba3 Compare April 17, 2024 12:07
BREAKING CHANGE: Calling the `get` or `contains` method on `NULL` map values now returns `NULL`. Use `coalesce(map.get(...), default)` or `coalesce(map.contains(), False)` to get the previous behavior.
@cpcloud cpcloud force-pushed the more-null-map-workarounds branch from a81bba3 to c81a755 Compare April 17, 2024 12:09
@cpcloud cpcloud added the breaking change Changes that introduce an API break at any level label Apr 17, 2024
@cpcloud
Copy link
Member Author

cpcloud commented Apr 17, 2024

Seems like the chocolatey package server is having a moment.

Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

Changes look good to me -- we can wait until chocolately recovers, or just force it

@gforsyth
Copy link
Member

Ahh, the sqlite failures are chocolatey, but Flink looks like a test failure

@cpcloud
Copy link
Member Author

cpcloud commented Apr 17, 2024

xfailed the single failing flink test

@gforsyth gforsyth merged commit b6c71d7 into ibis-project:main Apr 17, 2024
81 checks passed
@cpcloud cpcloud deleted the more-null-map-workarounds branch April 17, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that introduce an API break at any level bug Incorrect behavior inside of ibis duckdb The DuckDB backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add workarounds for duckdb MAP bugs
2 participants