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: Lift projectionMapping always when pushing down SelectExpressi… #18520

Merged
merged 1 commit into from
Oct 23, 2019

Conversation

smitpatel
Copy link
Contributor

…on into subuquery

Issue: When converting correlation to join, we add the join key columns to projection to make sure they are always available.
We had logic that if projection contains any columns then projection mapping is already applied to projection.
But in above case that is incorrect.
That leaves us with incorrect EntityProjection which fails in further translation as multi-part identifier could not be bound.

We should always lift projectionMapping during Pushdown unless projectionMapping is applied which can be checked through type.

This scenario does not work for owned/weak types due to #18519

Resolves #18514

@smitpatel smitpatel requested a review from maumar October 22, 2019 21:13
…on into subuquery

Issue: When converting correlation to join, we add the join key columns to projection to make sure they are always available.
We had logic that if projection contains any columns then projection mapping is already applied to projection.
But in above case that is incorrect.
That leaves us with incorrect EntityProjection which fails in further translation as multi-part identifier could not be bound.

We should always lift projectionMapping during Pushdown unless projectionMapping is applied which can be checked through type.

This scenario does not work for owned/weak types due to #18519

Resolves #18514
@smitpatel smitpatel merged commit 22679cf into release/3.1 Oct 23, 2019
@smitpatel smitpatel deleted the smit/issue18514 branch October 23, 2019 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants