-
Notifications
You must be signed in to change notification settings - Fork 1.9k
support additional operators in AnyOp #19297
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
| 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 |
There was a problem hiding this comment.
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.0as the needle doesn't reflect the behaviour ofanyhere since from what I can tell,column2arrays 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
add support for additional operators, specifically:
>,<,>=,<=part of #2548