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: include casts for numeric Literals except in comparisons #10933

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NickCrews
Copy link
Contributor

@NickCrews NickCrews commented Mar 3, 2025

Fixes #10890

I only ran this for duckdb locally, I'm curious to see how this does on all the other backends.

This is a bit of a one-off approach to special-case for the predicate pushdown problem described in project/ibis/issues/9662. eg we only make the special case of ops.UntypedNumericLiteral for numbers, but are there other instances where we also want to avoid a cast, so this should be a more general ops.UntypedLiteral?

For myself, a few of the common tests to run

  • pytest -k numeric_literal -vv ibis/backends/tests/test_numeric.py
  • pytest --snapshot-update -vv ibis/backends/tests/sql/test_compiler.py
  • pytest --snapshot-update -vv ibis/backends/tests/sql/test_sql.py

@github-actions github-actions bot added tests Issues or PRs related to tests duckdb The DuckDB backend sql Backends that generate SQL labels Mar 3, 2025
@NickCrews NickCrews force-pushed the numeric-literal-casting branch from 4a19d97 to a47ff46 Compare March 3, 2025 20:33

Verified

This commit was signed with the committer’s verified signature.
ewbankkit Kit Ewbank
@NickCrews NickCrews force-pushed the numeric-literal-casting branch from a47ff46 to 411e70d Compare March 3, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duckdb The DuckDB backend sql Backends that generate SQL tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(duckdb): literal python floats are interpreted as Decimals, not DOUBLE
1 participant