-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
What does happen?
The code for the MIN
and MAX
aggregates does not have any specialisation for nested types.
Instead, the compiler inserts a cast to string and the result is the maximum string, which doesn't work
when there are integers of varying sizes.
It also appears that the Value
comparison operators for nested types are not consistent with the current positional comparison semantics.
What should happen?
Nested types should be compared using the positional sorting semantics. This goes for both Value
comparisons as well as MIN
and MAX
.
To Reproduce
Steps to reproduce the behavior. Bonus points if those are only SQL queries.
sql select max(struct_pack(i := i + 2, j := i + 4)) from range(10) tbl(i);
- Expected:
{'i': 11, 'j': 13}
- Actual:
{'i': 9, 'j': 11}
Environment (please complete the following information):
- OS: OSX
- DuckDB Version 0.26
Before submitting
- Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Have you tried this on the latest
master
branch? In case you cannot compile, you may find some binaries here: https://github.com/duckdb/duckdb/releases/tag/master-builds
Metadata
Metadata
Assignees
Labels
No labels