-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SPI for delegating row expression optimizer #24144
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tdcmeehan.
Just some initial comments
presto-main/src/main/java/com/facebook/presto/server/testing/TestingPrestoServer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/expressions/ExpressionOptimizerManager.java
Show resolved
Hide resolved
17fd8e1
to
563611e
Compare
Codenotify: Notifying subscribers in CODENOTIFY files for diff dfc6304...2cf08d2. No notifications. |
563611e
to
948cf13
Compare
948cf13
to
d25b1b6
Compare
d25b1b6
to
6235f50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a high-level, the changes make sense. I had a few questions about the configuration and how we might be able to simplify it to be more straightforward for users
presto-tests/src/test/java/com/facebook/presto/memory/TestMemoryManager.java
Outdated
Show resolved
Hide resolved
presto-tests/src/test/java/com/facebook/presto/memory/TestMemoryManager.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/server/testing/TestingPrestoServer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/expressions/ExpressionOptimizerManager.java
Outdated
Show resolved
Hide resolved
...-main/src/main/java/com/facebook/presto/sql/relational/DelegatingRowExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/expressions/ExpressionOptimizerManager.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/com/facebook/presto/sql/planner/iterative/rule/SimplifyRowExpressions.java
Outdated
Show resolved
Hide resolved
...-main/src/main/java/com/facebook/presto/sql/relational/DelegatingRowExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
a7b6402
to
2d609d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments,
...main/src/test/java/com/facebook/presto/sql/planner/iterative/rule/TestRemoveMapCastRule.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/com/facebook/presto/tests/expressions/TestDelegatingExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
presto-tests/src/test/java/com/facebook/presto/tests/expressions/TestExpressionOptimizers.java
Outdated
Show resolved
Hide resolved
presto-tests/src/test/java/com/facebook/presto/tests/expressions/TestExpressionOptimizers.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/relational/ConnectorRowExpressionService.java
Show resolved
Hide resolved
97d0c3b
to
8c8d1f4
Compare
...s/src/test/java/com/facebook/presto/tests/expressions/TestDelegatingExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/server/testing/TestingPrestoServer.java
Outdated
Show resolved
Hide resolved
...-main/src/main/java/com/facebook/presto/sql/relational/DelegatingRowExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
ExpressionOptimizer delegate = expressionOptimizerManager.getExpressionOptimizer(session); | ||
Object currentExpression = rowExpression; | ||
Object originalExpression; | ||
for (int i = 0; i < maxOptimizationAttempts; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain a use case for multiple calls to the ExpressionOptimizer
? Shouldn't it be up to the ExpressionOptimizer
implementation to return the most optimized version it can for the level
?
...-main/src/main/java/com/facebook/presto/sql/relational/DelegatingRowExpressionOptimizer.java
Outdated
Show resolved
Hide resolved
3cbc135
to
6e124d2
Compare
47c0f8a
to
9d80d3e
Compare
The runtime should consolidate to the `ExpressionOptimizerProvider` factory so that it can be customized without significant refactoring.
9d80d3e
to
2cf08d2
Compare
Description
As part of RFC-0006, we need to support out of process expression evaluation. Add support for pluggable expression optimization and planner support to utilize the new SPI.
Motivation and Context
RFC-0006. See #24126 for larger changes that include the Presto sidecar as described in the RFC.
Impact
No impact by default as the old in-memory evaluation is the default.
Test Plan
Tests have been added.
Contributor checklist
Release Notes