-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Splitting out from #27124
Essentially that issue failed because translation of Sum had a bug and we failed to lift it, causing us to have single result subquery without limit operation. Currently we assume that whenever there is single result, there will be limit applied i.e. it can only appear as a result of Single & family operations.
We need to determine is our assumption is invariant.
There are 3 ways to have a single result in projection,
- Reference navigation on parameter. This is expanded as join in nav expansion so this would generate just a reference rather than a subquery.
- Subquery followed by Single or family operations (where invariant is already true).
- Subquery followed by aggregate operator. Ideally we should throw if operation fails to translate.
If any of above is wrapped in any client method that is somewhat irrelevant because we would pick the maximal translatable tree to send to server. This also covers case when we don't know aggregate operator because then we would insert subquery in that method call.
We need to do some exploratory testing to verify that invariant is true in all cases (we care about).
Reactions are currently unavailable