thomasrebele commented on code in PR #6352:
URL: https://github.com/apache/hive/pull/6352#discussion_r2915104514


##########
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java:
##########
@@ -94,16 +106,28 @@ public ExprNodeGenericFuncDesc(ObjectInspector oi, 
GenericUDF genericUDF,
         ObjectInspectorUtils.getWritableObjectInspector(oi);
     assert (genericUDF != null);
     this.genericUDF = genericUDF;
-    this.children = children;
+    this.children = children == null ? new ArrayList<>() : new 
ArrayList<>(children);

Review Comment:
   I've seen that some callers of getChildren modify the list, e.g., 
DynamicPartitionPruningOptimization, so I've I opted for `new ArrayList<>()` 
instead of `List.of()`.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to