Optimize lambda body when possible#13650
Merged
highker merged 2 commits intoprestodb:masterfrom Nov 28, 2019
Merged
Conversation
b69e8f3 to
ab1e25e
Compare
155050d to
6fd41bc
Compare
0eccbb7 to
05139b7
Compare
a3a34b8 to
c36ffbc
Compare
Contributor
Author
|
Thanks, fixed the issue in commit a0cab3cbff11c6a7185fc9d7e306b6478fc6ad53. |
highker
reviewed
Nov 7, 2019
presto-main/src/main/java/com/facebook/presto/sql/planner/RowExpressionInterpreter.java
Outdated
Show resolved
Hide resolved
|
There is an extra "dot" at the end of your first commit message body |
c36ffbc to
d0c4da8
Compare
d0c4da8 to
dc60353
Compare
rongrong
reviewed
Nov 11, 2019
Contributor
There was a problem hiding this comment.
Can you just use expectedExceptions = PrestoException.class, ...?
Contributor
Author
There was a problem hiding this comment.
Using @Test's expectedExceptions, we cannot match the error code, which is something we want to test here as well.
dc60353 to
b56348f
Compare
wenleix
reviewed
Nov 18, 2019
Contributor
There was a problem hiding this comment.
Maybe we can now remove the TODO comment above since we implement it?
Contributor
Author
There was a problem hiding this comment.
We are still not evaluating lambda (only have optimized its body) yet :) Lambda functions was treated as non-deterministic.
Currently, the error code is fixed to GENERIC_USER_ERROR, we need correct error code to be able to correctly do dispatching later.
Commit 98f05bf deprecated ExpressionOptimizer without porting the handling of lambda body into RowExpressionInterpreter. This commit added optimization on Lambda definition body so that expensive operation within lambda can be replaced with constant.
b56348f to
9271d03
Compare
9 tasks
This was referenced Dec 10, 2019
14 tasks
This was referenced Jan 2, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Commit 98f05bf deprecated
ExpressionOptimizerwithout porting thehandling of lambda body into
RowExpressionInterpreter. This commitadded optimization on Lambda definition body so that expensive
operation within lambda can be replaced with constant.
Fixes #13648