Skip to content

Improve the implementation of SelectExpression.HandlesQuerySource - #7589

Closed
tuespetre wants to merge 2 commits into
dotnet:devfrom
tuespetre:handles-query-source
Closed

tuespetre wants to merge 2 commits into
dotnet:devfrom
tuespetre:handles-query-source

Conversation

@tuespetre

Copy link
Copy Markdown
Contributor

This is another change I have isolated out of #7543. When isolated like this, the main improvement it offers is avoiding 'false positives' for IsCorrelated() as seen in the single changed test. In the context of the rest of #7543, the correctness of HandlesQuerySource() gains even more significance due to a few more places it gets used.

@dnfclas

dnfclas commented Feb 10, 2017

Copy link
Copy Markdown

Hi @tuespetre, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@tuespetre
tuespetre force-pushed the handles-query-source branch from 9a8e3e2 to 8627aef Compare February 16, 2017 04:20
@smitpatel

Copy link
Copy Markdown
Contributor

@anpete - does this isolated fix help your case?

@maumar maumar assigned anpete and unassigned maumar Feb 18, 2017
@maumar
maumar requested a review from anpete February 18, 2017 01:32
@maumar maumar assigned maumar and unassigned anpete Feb 18, 2017
@smitpatel

Copy link
Copy Markdown
Contributor

poaching this too @maumar

@smitpatel smitpatel assigned smitpatel and unassigned maumar Feb 22, 2017
@smitpatel

smitpatel commented Feb 22, 2017 •

Copy link
Copy Markdown
Contributor

@tuespetre - Can you elaborate reasoning behind such logic in HandlesQuerySource? Given a query source the method should return true, if any part of the select expression is translation of the query source in form of table or join expression. Neither should require you to look into TableExpression.QuerySource. The may be some value in unwrapping the querySource parameter if it is joinclause or processing table as JoinExpression. But needs to be tested out if there are test changes or there are scenarios (new tests) which actually needs such modifications.

@tuespetre

Copy link
Copy Markdown
Contributor Author

@smitpatel there is already one test change, it is for SQL server but it would have more impact on SQLite where lateral join is not supported.

@smitpatel

Copy link
Copy Markdown
Contributor

Can you elaborate the logic since it seems partially incorrect based on what is the function is required to do.

@tuespetre

Copy link
Copy Markdown
Contributor Author

Which part in particular seems incorrect?

@smitpatel

Copy link
Copy Markdown
Contributor

TableExpression.QuerySource as GroupJoinClause)?.JoinClause
We shouldn't look inside of the query sources for tables. They have to be set correctly. If they are not then there is bug somewhere.

@tuespetre tuespetre closed this Feb 23, 2017
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