korlov42 commented on a change in pull request #2623:
URL: https://github.com/apache/calcite/pull/2623#discussion_r761995089
##########
File path: core/src/main/java/org/apache/calcite/rel/core/Project.java
##########
@@ -89,25 +94,33 @@ protected Project(
List<RelHint> hints,
RelNode input,
List<? extends RexNode> projects,
- RelDataType rowType) {
+ RelDataType rowType,
+ Set<CorrelationId> variablesSet) {
super(cluster, traits, input);
assert rowType != null;
this.exps = ImmutableList.copyOf(projects);
this.hints = ImmutableList.copyOf(hints);
this.rowType = rowType;
+ this.variablesSet = Objects.requireNonNull(
+ ImmutableSet.copyOf(variablesSet), "variablesSet");
Review comment:
No, it's an artifact of moving this check to parent class :(.
`ImmutableSet.copyOf` will throw an NPE if someone will pass a null parameter.
So we need to wrap an argument `variablesSet` with `requiredNonNull`, and pass
the result to `copyOf`.
Thanks for noticing! Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]