Commit a55e2bf
fix(db): throw error when fn.select() is used with groupBy() (#1324)
* fix(db): throw error when fn.select() is used with groupBy()
fn.select() with groupBy() silently produced wrong results ({ __key_0: ... })
because the compiler cannot statically analyze an opaque function to discover
aggregate expressions needed by groupBy. This adds a clear error message
directing users to use the standard .select() API instead.
Closes #1189
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* ci: apply automated fixes
* chore: add changeset for fn.select + groupBy error
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent 373f62d commit a55e2bf
4 files changed
Lines changed: 46 additions & 0 deletions
File tree
- .changeset
- packages/db
- src
- query/compiler
- tests/query
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
436 | 447 | | |
437 | 448 | | |
438 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2167 | 2167 | | |
2168 | 2168 | | |
2169 | 2169 | | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
2170 | 2195 | | |
2171 | 2196 | | |
2172 | 2197 | | |
| |||
0 commit comments