Skip to content
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: Navigation Expansion take 2 #16785

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Query: Navigation Expansion take 2 #16785

merged 1 commit into from
Aug 1, 2019

Conversation

smitpatel
Copy link
Member

  • Add TransparentIdentifier to uniquify them across the pipeline
  • Convert all Enumerable based method which we can translate to Queryable
  • Add QueryableMethodProvider to get methodInfos on Queryable robustly
  • Split out subquery member pushdown out of navigation expansion
  • Lastly expand navigations

@smitpatel smitpatel changed the title Query: Navigation Expansion take 2 [WIP] Query: Navigation Expansion take 2 Jul 27, 2019
@smitpatel
Copy link
Member Author

smitpatel commented Jul 27, 2019

This is still WIP. I will complete the work next week. Just wanted to get it out to get early feedback.
Missing pieces
- GroupJoin/GroupBy/DefaultIfEmpty are not handled yet. (tests related to them are failing right now).
- InMemory has few test failure with must be reducible nodes & Cosmos fails on convert node around entityType before accessing navigations. Though only handful of tests.
So overall design seems to be working.
I haven't done clean up yet. nit comments can wait.

How it works (on high level)

  • EntityReference tracks entity in current result type
  • IncludeTreeNode contains include tree which would be passed upon when expanding navigations
  • NavigationTreeNode is a binary tree structure for transparent identifier. The point is, you create it once and then forget it. All join would just expand the tree further. And the initial tree will automatically get outer/inner based path. This saves a lot of processing in terms of remapping.
  • Includes are applied at top level only so no need to remove them or anything.
  • Eager loaded navigations added to includeTree as soon as the queryable creates new EntityReference. It prunes itself as shape changes.

While this has not fixed any issue, it lays groundwork for many

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a partial review - I haven't gone over the core of the changes yet but will hopefully do that very soon.

Copy link
Member

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to re-target to release/3.0 before merging.

@smitpatel smitpatel changed the base branch from master to release/3.0 July 30, 2019 17:54
@smitpatel smitpatel changed the title [WIP] Query: Navigation Expansion take 2 Query: Navigation Expansion take 2 Jul 31, 2019
@smitpatel
Copy link
Member Author

This is ready for review.

@smitpatel
Copy link
Member Author

@AndriySvyryd - Also removed calling subquery member pushdown twice. Now it runs only after collection navigation is expanded and generating key access over FirstOrDefault.

Copy link
Contributor

@maumar maumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@smitpatel
Copy link
Member Author

Everything passed. If anyone wants to give a re-review, feel free. I will wait till tomorrow noon for merge.

- Add TransparentIdentifier to uniquify them across the pipeline
- Convert all Enumerable based method which we can translate to Queryable
- Add QueryableMethodProvider to get methodInfos on Queryable robustly
- Split out subquery member pushdown out of navigation expansion
- Lastly expand navigations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants