geldata / geldata/gel-cli

Implicit limit warnings not surfaced inside certain computeds

Open
#1,101 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
175
Forks
32
PR merge metrics
No merged PRs in 30d

Description

[follow up from discord
](https://discord.com/channels/841451783728529451/849377751370432573/1128345776968450068)

- EdgeDB Version: 3.1-3.4 and 4.0-dev.7662+8e24887
- EdgeDB CLI Version: 3.4.0+4d95a2c
- OS Version: macos 13.1

Steps to Reproduce:

1.
```edgeql
insert B {
a:=(select {(insert A{name:="1"}), (insert A{name:="2"})}),
aa:=(select {(insert A{name:="1"}), (insert A{name:="4"})})
};
```
2.
```edgeql
select (
group
(select B).computed
by .name
);
```
This produces the expected output with two members in the `name: 1` group
```
{
{
key: {name: '1'},
grouping: {'name'},
elements: {default::A {id: 0450407c-219c-11ee-9b47-9f4e0e6b7acc}, default::A {id: 04505d82-219c-11ee-9b47-67e35ba922f8}},
},
{key: {name: '2'}, grouping: {'name'}, elements: {default::A {id: 045063c2-219c-11ee-9b47-0b14cb3b3042}}},
{key: {name: '4'}, grouping: {'name'}, elements: {default::A {id: 045059a4-219c-11ee-9b47-4ba9333c026a}}},
}
```

3. `\set limit 1`, re run groupby query
```
{{key: {name: '1'}, grouping: {'name'}, elements: {default::A {id: 0450407c-219c-11ee-9b47-9f4e0e6b7acc}}}, ...}
```
**Implicit limit warning is present on the outer groups set but not inside the grouping where the `...2f8` object is missing.**

This only seems to happen with a computed. I have a more complicated scenario where the top level group is also missing w/o warning but unfortunately wasn't able to reduce that. Hopefully this is enough to reproduce.

Schema:

```
type A {
required property name: str;
}

type B {
multi link a -> A;
multi link aa -> A;
multi link computed := distinct(.a union .aa);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.