Jackie-Jiang commented on code in PR #8732:
URL: https://github.com/apache/pinot/pull/8732#discussion_r877331922
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/GroovyFunctionEvaluator.java:
##########
@@ -86,13 +86,13 @@ public List<String> getArguments() {
public Object evaluate(GenericRow genericRow) {
for (String argument : _arguments) {
Object value = genericRow.getValue(argument);
- if (value == null) {
- // FIXME: if any param is null a) exit OR b) assume function handles
it ?
- return null;
- }
_binding.setVariable(argument, value);
}
- return _script.run();
+ try {
+ return _script.run();
Review Comment:
@npawar Good call. Yes, it is essentially a decision between fail fast or
keep the ingestion going but fill the default value.
Since we are throwing the exception right now, we might want to keep the
same behavior. One way to get both worlds is to add a flag to track if any
argument is `null`, and return `null` if the flag is `true`, throw exception if
the flag is `false`
--
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]