Skip to content

[Feature] Support calc constant expr by BE#6233

Merged
morningman merged 2 commits intoapache:masterfrom
qidaye:fold_constant
Jul 19, 2021
Merged

[Feature] Support calc constant expr by BE#6233
morningman merged 2 commits intoapache:masterfrom
qidaye:fold_constant

Conversation

@qidaye
Copy link
Contributor

@qidaye qidaye commented Jul 14, 2021

Proposed changes

At present, some constant expression calculations are implemented on the FE side,
but they are incomplete, and some expressions cannot be completely consistent with
the value calculated by BE (such as part of the time function)

Therefore, we provide a way to pass all the constants in SQL to BE for calculation,
and then begin to analyze and plan SQL. This method can also solve the problem that some
complex constant calculations issued by BI cannot be processed on the FE side.

Here through a session variable enable_fold_constant_by_be to control this function,
which is disabled by default.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix [Feature] Fold constant expr by Backend #6232 ) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

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...

Change-Id: Ifa4e98cfe1db3a9efc5f101639566623778e79c3
@morningman morningman added area/planner Issues or PRs related to the query planner kind/feature Categorizes issue or PR as related to a new feature. labels Jul 14, 2021
morningman
morningman previously approved these changes Jul 14, 2021
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Jul 14, 2021
Change-Id: Idb2ba55ad77cb3182df03a12e7b61698591e44a1
@morningman morningman added approved Indicates a PR has been approved by one committer. and removed approved Indicates a PR has been approved by one committer. labels Jul 18, 2021
@morningman morningman merged commit a1a37c8 into apache:master Jul 19, 2021
@morningman morningman mentioned this pull request Oct 10, 2021
@qidaye qidaye deleted the fold_constant branch February 11, 2022 06:54
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 kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Fold constant expr by Backend

2 participants