-
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
[Native] Trim native prefix for system session property #21023
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.
@kewang1024 thanks for the change!
presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
95635b7
to
62de48e
Compare
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
7877ec1
to
b97575e
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.
@kewang1024 LGTM. Can you check with @amitkdutta as we might need to update our internal job setup with the changed session properties. Thanks!
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp
Outdated
Show resolved
Hide resolved
presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp
Outdated
Show resolved
Hide resolved
b97575e
to
46de7ee
Compare
@@ -51,13 +51,23 @@ folly::IOThreadPoolExecutor* spillExecutorPtr() { | |||
} | |||
|
|||
namespace { | |||
std::string maybeRemoveNativePrefix(const std::string& name) { | |||
static const std::string kNativePrefix = "native_"; | |||
const auto result = |
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.
Will it work with old coordinator where native prefix is not passed? We can keep the worker backward compatible so that it can work with native and without native prefixed properties. Once coordinator is updated, we can remove anything that does not have native prefix.
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.
I think it will work if old coordinator doesn't pass native prefix.
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.
Nice. Then lets just enhance the unit test to keep the legacy case. Once coordinator is updated, we can remove it.
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.
Yes, it will work with old coordinator
@kewang1024 Lets keep the worker compatible with old coordinator. |
presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp
Show resolved
Hide resolved
46de7ee
to
d307d4f
Compare
d307d4f
to
5babfc1
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.
Thanks @kewang1024 for adding the tests.
Also add writer_native_spill_enabled session property.