Skip to content

Conversation

@jtuglu1
Copy link
Contributor

@jtuglu1 jtuglu1 commented Oct 3, 2025

Rationale for this change

Want to support calling BETWEEN for any valid column types, not just numeric columns. This extends support for filter expressions like date_col BETWEEN '2025-01-01' AND '2025-01-02'.

The test_invalid_between test was removed in favor of letting the type checks happen at evaluation time (when the literals are attempted to be cast to the corresponding column's type for comparison).

Are these changes tested?

Yes, tested locally applying filters to tables.

Are there any user-facing changes?

Yes, BETWEEN operator signature has changed, it nows supports all comparable column types.

@jtuglu1
Copy link
Contributor Author

jtuglu1 commented Oct 4, 2025

@Fokko @kevinjqliu any thoughts here?

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Nice one @jtuglu1 I wasn't aware of this limitation, and I agree that it should be between literals. We'll convert the types when we bind it to the schema 👍

@Fokko Fokko merged commit bc2aa00 into apache:main Oct 5, 2025
10 checks passed
@Fokko
Copy link
Contributor

Fokko commented Oct 5, 2025

Also, thanks for the review @maytasm 🙌

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.

3 participants