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
min()/max() return wrong results on some collections #6768
Labels
Comments
All types have comparison functions, so we can just delegate to the type. |
jul-stas
added a commit
to jul-stas/scylladb
that referenced
this issue
Jul 8, 2020
For collections and UDTs the `MIN()` and `MAX()` functions are generated on the fly. Until now they worked by comparing just the byte representations of arguments. This patch uses specific per-type comparators to provide semantically sensible, dynamically created aggregates. Fixes scylladb#6768
avikivity
added a commit
that referenced
this issue
Jul 8, 2020
…iusz " For collections and UDTs the `MIN()` and `MAX()` functions are generated on the fly. Until now they worked by comparing just the byte representations of their arguments. This patch employs specific per-type comparators to provide semantically sensible, dynamically created aggregates. Fixes #6768 " * jul-stas-6768-use-type-comparators-for-minmax: tests: Test min/max on set aggregate_fcts: Use per-type comparators for dynamic types
avikivity
pushed a commit
that referenced
this issue
Aug 3, 2020
For collections and UDTs the `MIN()` and `MAX()` functions are generated on the fly. Until now they worked by comparing just the byte representations of arguments. This patch uses specific per-type comparators to provide semantically sensible, dynamically created aggregates. Fixes #6768 (cherry picked from commit 5b438e7)
avikivity
pushed a commit
that referenced
this issue
Aug 3, 2020
For collections and UDTs the `MIN()` and `MAX()` functions are generated on the fly. Until now they worked by comparing just the byte representations of arguments. This patch uses specific per-type comparators to provide semantically sensible, dynamically created aggregates. Fixes #6768 (cherry picked from commit 5b438e7)
avikivity
pushed a commit
that referenced
this issue
Aug 3, 2020
For collections and UDTs the `MIN()` and `MAX()` functions are generated on the fly. Until now they worked by comparing just the byte representations of arguments. This patch uses specific per-type comparators to provide semantically sensible, dynamically created aggregates. Fixes #6768 (cherry picked from commit 5b438e7)
Backported to 4.0, 4.1, 4.2. |
the issue description here is probably wrong, using the same PK for 2 inserts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
max(s2) is correct, but max(s1) is incorrect.
The text was updated successfully, but these errors were encountered: