We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use TDVT data set for experiments
opensearchsql> select int0 i0, int1 i1, int2 from calcs; fetched rows / total rows = 17/17 +------+------+--------+ | i0 | i1 | int2 | |------+------+--------| | 1 | -3 | 5 | | null | -6 | -4 | | null | null | 5 | | null | -4 | -5 | | 7 | null | 3 | | 3 | null | 2 | | 8 | null | 9 | | null | 2 | 0 | | null | 3 | -6 | | 8 | 3 | -9 | | 4 | null | -3 | | 10 | -8 | -4 | | null | null | 0 | | 4 | null | 4 | | 11 | null | -8 | | 4 | null | -9 | | 8 | -9 | 6 | +------+------+--------+
The test query:
select max(int0), int1, min(int2) from calcs group by int1;
OpenSearch:
opensearchsql> select max(`int0`), `int1`, min(`int2`) from calcs group by `int1`; fetched rows / total rows = 8/8 +---------------+--------+---------------+ | max(`int0`) | int1 | min(`int2`) | |---------------+--------+---------------| | 11 | null | -9 | | 8 | -9 | 6 | | 10 | -8 | -4 | | -2147483648 | -6 | -4 | | -2147483648 | -4 | -5 | | 1 | -3 | 5 | | -2147483648 | 2 | 0 | | 8 | 3 | -9 | +---------------+--------+---------------+
MySQL:
mysql> select max(`int0`), `int1`, min(`int2`) from Calcs group by `int1`; +-------------+------+-------------+ | max(`int0`) | int1 | min(`int2`) | +-------------+------+-------------+ | 1 | -3 | 5 | | NULL | -6 | -4 | | 11 | NULL | -9 | | NULL | -4 | -5 | | NULL | 2 | 0 | | 8 | 3 | -9 | | 10 | -8 | -4 | | 8 | -9 | 6 | +-------------+------+-------------+ 8 rows in set (0.00 sec)
See also (could be related):
SUM(const)
The text was updated successfully, but these errors were encountered:
BTW, why GROUP BY reorders rows?
GROUP BY
Sorry, something went wrong.
min
max
avg
Revert opensearch-project#817 fix, extracted to a separate branch.
d734103
Signed-off-by: Yury-Fridlyand <[email protected]>
Yury-Fridlyand
Successfully merging a pull request may close this issue.
I use TDVT data set for experiments
dataset
The test query:
OpenSearch:
MySQL:
See also (could be related):
SUM(const)
fails with IllegalStateException #799The text was updated successfully, but these errors were encountered: