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

Wrong error message when (mis)using aggregate functions #1826

Open
SimoneLazzaris opened this issue Oct 12, 2023 · 0 comments
Open

Wrong error message when (mis)using aggregate functions #1826

SimoneLazzaris opened this issue Oct 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@SimoneLazzaris
Copy link
Collaborator

What happened

immuclient>query select * from aaa;
+----------------------------------------+---------------+---------------+
|               (aaa.xid)                | (aaa.payload) | (aaa.cronogy) |
+----------------------------------------+---------------+---------------+
| "00000000-0000-0000-0000-000000000000" | "salacadula"  |             1 |
| "46297fd0-68dd-11ee-8e22-9387c2da716c" | "apollo"      |             1 |
| "7a8d7d06-c703-4656-b5e4-380ae65763ea" | "apollo"      |             1 |
| "b96d62f3-2cb6-5122-bba8-4e6bfdafef35" | "apollo"      |             1 |
| "ffffffff-ffff-ffff-ffff-ffffffffffff" | "salacadula"  |             1 |
+----------------------------------------+---------------+---------------+

immuclient>exec update aaa set cronogy=max(cronogy)+1.0;
ERROR: rpc error: code = Unknown desc = column does not exist (cronogy)

What you expected to happen
This is how sqlite reports the error:

sqlite> update asd set cronogy=max(cronogy)+1.0;
Parse error: misuse of aggregate function max()
  update asd set cronogy=max(cronogy)+1.0;
                         ^--- error here

How to reproduce it (as minimally and precisely as possible)

See above

Environment

$ immudb version
immudb 1.9.0-RC1
Commit  : 0a2992d0bfcde383379081a10cd1d12af68c486b
Built by: slazzaris@gmail.com
Built at: Thu, 12 Oct 2023 11:43:26 CEST

Additional info (any other context about the problem)

@SimoneLazzaris SimoneLazzaris added the bug Something isn't working label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant