mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 04:24:21 +01:00
Merge 'core/translate: Fix "misuse of aggregate function" error message' from Pekka Enberg
```
sqlite> CREATE TABLE test1(f1, f2);
sqlite> SELECT SUM(min(f1)) FROM test1;
Parse error: misuse of aggregate function min()
SELECT SUM(min(f1)) FROM test1;
^--- error here
```
Spotted by SQLite TCL tests.
Closes #2032
This commit is contained in:
@@ -693,7 +693,7 @@ pub fn translate_expr(
|
||||
|
||||
match &func_ctx.func {
|
||||
Func::Agg(_) => {
|
||||
crate::bail_parse_error!("aggregation function in non-aggregation context")
|
||||
crate::bail_parse_error!("misuse of aggregate function {}()", name.0)
|
||||
}
|
||||
Func::External(_) => {
|
||||
let regs = program.alloc_registers(args_count);
|
||||
|
||||
Reference in New Issue
Block a user