-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Don't keep mutable config instance on a field #14475
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.
❤️ 🙌
@@ -119,7 +119,9 @@ public DynamicFilterService(Metadata metadata, FunctionManager functionManager, | |||
this.metadata = requireNonNull(metadata, "metadata is null"); | |||
this.functionManager = requireNonNull(functionManager, "functionManager is null"); | |||
this.typeOperators = requireNonNull(typeOperators, "typeOperators is null"); | |||
this.dynamicFilterConfig = requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); | |||
requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); |
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.
nit: requireNonNull
is not needed in Java 15+ when we immediately dereference the variable, because the NPE message will be as good or better. @findepi removed such calls en masse recently.
this.smallPartitionedMaxSizePerOperator = dynamicFilterConfig.getSmallPartitionedMaxSizePerOperator(); | ||
|
||
|
||
this.largePartitionedMaxDistinctValuesPerDriver = dynamicFilterConfig.getLargePartitionedMaxDistinctValuesPerDriver(); |
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.
Is this gap on purpose?
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.
No. Thanks for catching that. Removed the empty lines.
a255ffb
to
6baa316
Compare
CI hit #14487 |
@@ -119,7 +119,9 @@ public DynamicFilterService(Metadata metadata, FunctionManager functionManager, | |||
this.metadata = requireNonNull(metadata, "metadata is null"); | |||
this.functionManager = requireNonNull(functionManager, "functionManager is null"); | |||
this.typeOperators = requireNonNull(typeOperators, "typeOperators is null"); | |||
this.dynamicFilterConfig = requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); | |||
requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); |
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.
redundant
@@ -467,7 +481,23 @@ public LocalExecutionPlanner( | |||
this.joinCompiler = requireNonNull(joinCompiler, "joinCompiler is null"); | |||
this.operatorFactories = requireNonNull(operatorFactories, "operatorFactories is null"); | |||
this.orderingCompiler = requireNonNull(orderingCompiler, "orderingCompiler is null"); | |||
this.dynamicFilterConfig = requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); | |||
requireNonNull(dynamicFilterConfig, "dynamicFilterConfig is null"); |
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.
redundant, see #13940
6baa316
to
21c6004
Compare
Compatibility failed due to lack of the latest docker image. https://trinodb.slack.com/archives/CFP480UKX/p1665108934638869 |
Description
Don't keep mutable config instance on a field
Release notes
(x) This is not user-visible or docs only and no release notes are required.