-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query: Lift subquery with nested orderby #8054
Comments
@smitpatel @maumar Any ideas? Another thing I noticed is that 'join _c1 in..' is being marked for materialization. |
What is the condition which is blocking flattening of join? In Sql, join clause is not being materialized but inner Customer is which is weird. |
@smitpatel I think it is the presence of OrderBy without skip/take. The OrderBy is lifted to the outer table expression during Subquery push-down. |
If we remove the code which is lifting order by outside in PushDownSubquery, does this query work fine? |
Yes! But others don't 😬 |
@anpete - Is this blocking issue for you? The side effects so far I have found
|
@smitpatel Not blocking, just regresses certain include queries. Do we know how many other queries may be improved if we fix this? |
I worked out to remove copying order by for all push down queries to only limit/offset/group join (include works because query model already lifts it). |
Also, query in first post fails at runtime due to bug in projection shaper. I did not see any other query being lifted anywhere though. |
The following query:
produces
I think this is because of the orderby lifting happening in SE.PushDownSubquery. This query represents some Include queries that are worse with the new compiler
The text was updated successfully, but these errors were encountered: