Skip to content
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(X,Y) and max(X,Y) are wrong with when arguments are different type #339

Closed
travenin opened this issue Sep 21, 2024 · 0 comments · Fixed by #340
Closed

min(X,Y) and max(X,Y) are wrong with when arguments are different type #339

travenin opened this issue Sep 21, 2024 · 0 comments · Fixed by #340

Comments

@travenin
Copy link
Contributor

Quick observation that min and max don't work logically when arguments are different type. I tested between integer and real which are obvious.

Limbo:

limbo> select min(1, 5); -- Correct
1
limbo> select min(1, 5.0); -- Incorrect
5.0
limbo> select max(1, 5.0); -- As well incorrect
1

Compared to SQLite:

sqlite> select min(1, 5);
1
sqlite> select min(1, 5.0);
1
sqlite> select max(1, 5.0);
5.0

I expect Limbo should follow SQLite logic.

penberg pushed a commit that referenced this issue Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant