Skip to content

feat(query_engine): implement IntBetween::toArrowExpression - #1841

Open
fengelniederhammer wants to merge 4 commits into
mainfrom
1820-implement-intbetweentoarrowexpression
Open

fengelniederhammer wants to merge 4 commits into
mainfrom
1820-implement-intbetweentoarrowexpression

Conversation

@fengelniederhammer

Copy link
Copy Markdown
Contributor

resolves #1820

Summary

Allows to evaluate an int .between(...) operator on intermediate results (i.e. something that is not a table in the DB).

PR Checklist

  • All necessary documentation has been adapted or there is an issue to do so.
  • The implemented feature is covered by an appropriate test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The unbounded IntBetween branch lacks a direct Arrow unit test for values and validity bits before and after negation, leaving null-to-false regressions undetected.

1 open issue
What changed in this PR

Implements IntBetween::toArrowExpression so integer .between(...) filters can run on intermediate query results, addressing #1820.

Changes:

  • Translates inclusive bounds into Arrow comparisons using 64-bit literals.
  • Preserves null results for null inputs, including the unbounded case.
  • Adds query tests for mapped columns, negation, open bounds, and values beyond the 32-bit range.
File Description
src/​rhydb/​query_engine/​scalar_expressions/​int_between.test.cpp Adds Arrow-path scenarios for 32-bit and 64-bit integer columns.
src/​rhydb/​query_engine/​scalar_expressions/​int_between.h Declares the Arrow-expression override.
src/​rhydb/​query_engine/​scalar_expressions/​int_between.cpp Implements bound comparisons and null-preserving unbounded evaluation.

Review effort: Balanced

@fengelniederhammer
fengelniederhammer requested review from taepper and a balanced review from Copilot November 18, 2026 09:18
@fengelniederhammer
fengelniederhammer marked this pull request as ready for review November 18, 2026 09:18
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.17.6 (2026-11-18)

Features

  • query_engine: add type casts at query execution time (#1799) (f7acdf0)

Bug Fixes

  • query_engine: do not decompress every row before applying a limit (#1833) (d3c06a2)
  • query_engine: evaluate out-of-bound .at() expressions to null for null inputs (#1839) (511d2ee)
  • query_engine: limit the nesting of queries (#1828) (599d3a4)
  • query_engine: treat Unicode whitespace as whitespace and report non-ASCII errors (#1816) (edc1c02)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Test coverage is missing for intermediate-result filtering through FilterNode and the unbounded Arrow branch, including negation and null-handling behavior.

1 open issue
1 resolved since last review

Review effort: Balanced

@taepper taepper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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.

Implement IntBetween::toArrowExpression

3 participants