Skip to content

feat: Support date/integer arithmetic and decimal non-equi join comparisons - #29156

Merged
ritchie46 merged 1 commit into
mainfrom
sql-tpcds-tail
Sep 4, 2026
Merged

ritchie46 merged 1 commit into
mainfrom
sql-tpcds-tail

Conversation

@ritchie46

Copy link
Copy Markdown
Member

No description provided.

…comparisons

Two TPC-DS queries failed to plan:

- q72 uses `d3.d_date > d1.d_date + 5`. Lower `date + n` / `date - n` in the
  SQL layer to a whole-day shift via `duration(days=n)`, matching the
  semantics of other SQL engines. The expression API is unchanged.

- q65 compares `Decimal(38, 2)` to `Float64` inside a `join_where` predicate.
  `get_numeric_upcast_supertype_lossless` has no decimal arm and returned
  `None`, so the comparison was rejected. Route comparisons where either side
  is a decimal through `try_get_supertype`, as an equivalent filter would.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3zEh6bx42AkyRP6jKvdPY
@github-actions github-actions Bot added A-dtype-decimal Area: decimal data type A-sql Area: Polars SQL functionality enhancement New feature or an improvement of an existing feature title needs formatting labels Sep 4, 2026
@ritchie46 ritchie46 changed the title feat(sql): Support date/integer arithmetic and decimal non-equi join comparisons feat: Support date/integer arithmetic and decimal non-equi join comparisons Sep 4, 2026
@ritchie46
ritchie46 marked this pull request as ready for review September 4, 2026 14:05
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The uncompressed lib size after this PR is 54.7149 MB (at 4fb4354).

@github-actions github-actions Bot added python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Sep 4, 2026
@ritchie46
ritchie46 merged commit 6edb632 into main Sep 4, 2026
35 of 36 checks passed
@ritchie46
ritchie46 deleted the sql-tpcds-tail branch September 4, 2026 14:23
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.64%. Comparing base (fec681c) to head (4fb4354).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29156      +/-   ##
==========================================
- Coverage   81.65%   81.64%   -0.02%     
==========================================
  Files        1905     1905              
  Lines      270933   270965      +32     
  Branches     3105     3105              
==========================================
- Hits       221242   221222      -20     
- Misses      48906    48960      +54     
+ Partials      785      783       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-dtype-decimal Area: decimal data type A-sql Area: Polars SQL functionality enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant