Skip to content

[feature](Nereids): support make miss slot as null alias when converting anti join - #31854

Merged
morrySnow merged 2 commits into
apache:masterfrom
keanji-x:fix_left_anti
Mar 7, 2024
Merged

[feature](Nereids): support make miss slot as null alias when converting anti join#31854
morrySnow merged 2 commits into
apache:masterfrom
keanji-x:fix_left_anti

Conversation

@keanji-x

@keanji-xkeanji-x commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

Proposed changes

/**
* project(A.*, B.slot)
* - filter(B.slot is null)
* - LeftOuterJoin(A, B)
* ==============================>
* project(A.*, null as B.slot)
* - LeftAntiJoin(A, B)
*/

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@doris-robot

Copy link
Copy Markdown

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

@keanji-x

Copy link
Copy Markdown
ContributorAuthor

run buildall

morrySnow
morrySnow previously approved these changes Mar 6, 2024
@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Mar 6, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@keanji-x

Copy link
Copy Markdown
ContributorAuthor

run buildall

@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Mar 7, 2024
return null;
}

if (!newJoin.getOutputSet().containsAll(filter.getInputSlots())) {

@xzj7019xzj7019Mar 7, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need to add cases to cover null as (b.id1 + b.id2)?

contains "OUTER JOIN"
}

explain {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this will do or-expansion and side b can be converted to anti?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

orExpansion is behind convertToAnti, so it is not supported right now.

morrySnow
morrySnow previously approved these changes Mar 7, 2024
@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Mar 7, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Mar 7, 2024
@keanji-x

Copy link
Copy Markdown
ContributorAuthor

run buildall

@morrySnow

Copy link
Copy Markdown
Contributor

run p0

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Mar 7, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@morrySnow
morrySnow merged commit 56c1a17 into apache:masterMar 7, 2024
yiguolei pushed a commit that referenced this pull request Mar 9, 2024
…ng anti join (#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
keanji-x added a commit to keanji-x/doris that referenced this pull request Mar 18, 2024
…ng anti join (apache#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
keanji-x added a commit to keanji-x/doris that referenced this pull request Mar 18, 2024
…ng anti join (apache#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
keanji-x added a commit to keanji-x/doris that referenced this pull request Mar 18, 2024
…ng anti join (apache#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
morrySnow pushed a commit that referenced this pull request Mar 19, 2024
…nti join (#31854) (#32417)
pick from master #31854 and #32214
[feature](Nereids) support make miss slot as null alias when converting anti join (#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
[fix](Nereids): don't pushdown project when project contains both side of join (#32214)
@xiaokangxiaokang mentioned this pull request Mar 22, 2024
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
…nti join (apache#31854) (apache#32417)
pick from master apache#31854 and apache#32214
[feature](Nereids) support make miss slot as null alias when converting anti join (apache#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
[fix](Nereids): don't pushdown project when project contains both side of join (apache#32214)
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…ng anti join (apache#31854)
transform
project(A.*, B.slot)
- filter(B.slot is null)
- LeftOuterJoin(A, B)
to
project(A.*, null as B.slot)
- LeftAntiJoin(A, B)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.0.7-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@keanji-x@doris-robot@morrySnow@xzj7019