Skip to content

[fix](planner)push constant expr in predicate to outer join's other conjuncts by mistake - #11527

Merged
morningman merged 2 commits into
apache:masterfrom
morrySnow:fix_constant_push_down
Aug 8, 2022
Merged

morningman merged 2 commits into
apache:masterfrom
morrySnow:fix_constant_push_down

Conversation

@morrySnow

Copy link
Copy Markdown
Contributor

Proposed changes

Issue Number: close #11526

Problem summary

constant expr in predicate should not be pushed to outer join's other conjuncts

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions github-actions Bot added area/planner Issues or PRs related to the query planner kind/test labels Aug 4, 2022
@morrySnow
morrySnow requested a review from morningman August 5, 2022 15:15
"""

order_qt_select """
select t.* from (select * from wftest1 t1 left join wftest2 t2 on t1.aa=t2.cc) t where dayofweek(current_date())=8;

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.

What should be returned for query select * from wftest1 t1 left join wftest2 t2 on t1.aa=t2.cc and dayofweek(current_date())=8 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

all rows of left table with all columns of right table filled by null.

@morningman morningman left a comment

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.

LGTM

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Aug 8, 2022
@github-actions

github-actions Bot commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit 1701ffa into apache:master Aug 8, 2022
yiguolei pushed a commit that referenced this pull request Aug 9, 2022
…onjuncts by mistake (#11527)

constant expr in predicate should not be pushed to outer join's other conjuncts
@morrySnow
morrySnow deleted the fix_constant_push_down branch September 7, 2022 01:53
Henry2SS pushed a commit to Henry2SS/incubator-doris that referenced this pull request Sep 14, 2022
…onjuncts by mistake (apache#11527)

constant expr in predicate should not be pushed to outer join's other conjuncts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner dev/merge-1.1.2 kind/test reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] push constant expr in predicate to outer join's other conjuncts by mistake

4 participants