The visitor has bunch of issues while trying to find correct parent group by query
- If parent was pushed down for whatever reason.
- If the grouping subquery changed table alias due to uniquification
An ideal but bit costly solution would be avoid doing the lift in first place. If the queryable translation did 2-way running translation for aggregate/non-aggregate scenario both then we don't need to do lifting as correct SQL would be automatically generated. This could also help in custom aggregate operation translation support.
The visitor has bunch of issues while trying to find correct parent group by query
An ideal but bit costly solution would be avoid doing the lift in first place. If the queryable translation did 2-way running translation for aggregate/non-aggregate scenario both then we don't need to do lifting as correct SQL would be automatically generated. This could also help in custom aggregate operation translation support.