Skip to content

Conversation

@darshanime
Copy link

@darshanime darshanime commented Dec 12, 2025

add support for additional operators, specifically: >, <, >=, <=

part of #2548

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Dec 12, 2025
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up. Would you be able to provide a description & justification of changes made here, to make it easier to review?

Edit: I also edited the PR body to not close the issue since I think we'll also want support for <> before closing the issue

Comment on lines +6605 to +6623
query I
select count(*) from arrays where 10.0<any(column2);
----
3

query I
select count(*) from arrays where 10.0<=any(column2);
----
3

query I
select count(*) from arrays where 10.0>any(column2);
----
3

query I
select count(*) from arrays where 10.0>=any(column2);
----
3
Copy link
Contributor

@Jefffrey Jefffrey Dec 14, 2025

Choose a reason for hiding this comment

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

I feel these tests aren't very clear as to what is happening:

  • They all have the same apparent result
  • The choice of 10.0 as the needle doesn't reflect the behaviour of any here since from what I can tell, column2 arrays all either have elements less than 10 or greater than 10, but none that span both of those ranges

Perhaps these would be clearer if we chose a needle that for some arrays is greater & less than elements in a single array row, and maybe have the data closer to here (rather than using arrays) so the test is easier to read?

Edit: also prefer not using count(*) and just return the results as is, so it's much clearer what the output is instead of an opaque count

@Jefffrey Jefffrey marked this pull request as draft December 30, 2025 04:45
@Jefffrey Jefffrey mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants