Skip to content

(#3395)calculate 'case when expr' when possible - #3396

Merged
morningman merged 9 commits into
apache:masterfrom
wangbo:eval_case_when_expr
May 7, 2020
Merged

(#3395)calculate 'case when expr' when possible#3396
morningman merged 9 commits into
apache:masterfrom
wangbo:eval_case_when_expr

Conversation

@wangbo

Copy link
Copy Markdown
Contributor

(#3395)
calculate 'case when expr' when possible

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

Could you add a ut for this case? In QueryPlanTest.java

@wangbo

Copy link
Copy Markdown
ContributorAuthor

@morningman ut added

Comment threadfe/src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java Outdated
@wangbo

Copy link
Copy Markdown
ContributorAuthor

major change
1 support case when and case xxx when
2 support multi case when
3 add ut

Todo
1 fix clerical error in CaseExpr
2 make CaseExpr format better
I will fix the todo in another pr,because I'm not sure the fix cost

Comment threadfe/src/test/java/org/apache/doris/planner/QueryPlanTest.java Outdated
Comment threadfe/src/test/java/org/apache/doris/planner/QueryPlanTest.java Outdated
Comment threadfe/src/test/java/org/apache/doris/planner/QueryPlanTest.java
Comment threadfe/src/main/java/org/apache/doris/analysis/CaseExpr.java Outdated
Comment threadfe/src/main/java/org/apache/doris/analysis/CaseExpr.java
2 add more ut
3 fix logic bug
2 clone a new expr when return CaseExpr which has been changed
Comment threadfe/src/test/java/org/apache/doris/utframe/UtFrameUtils.java Outdated
@wangbo
wangboforce-pushed the eval_case_when_expr branch from 91302de to 4d3c681CompareMay 3, 2020 05:39
kangkaisen
kangkaisen previously approved these changes May 4, 2020

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

+1, LGTM

SSD cool downtime shouldn't be fix time in UT;
kangkaisen
kangkaisen previously approved these changes May 5, 2020

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

+1, LGTM

@wangbo

Copy link
Copy Markdown
ContributorAuthor

resolve conflict

@morningmanmorningman 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

@morningmanmorningman self-assigned this May 7, 2020
@morningmanmorningman added approved Indicates a PR has been approved by one committer. area/sql/execution Issues or PRs related to the execution engine area/sql/function Issues or PRs related to the SQL functions labels May 7, 2020
@morningman
morningman merged commit d60bb81 into apache:masterMay 7, 2020
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.area/sql/executionIssues or PRs related to the execution enginearea/sql/functionIssues or PRs related to the SQL functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@wangbo@morningman@kangkaisen