xiangfu0 commented on code in PR #12763: URL: https://github.com/apache/pinot/pull/12763#discussion_r1588603746
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java: ########## @@ -583,15 +583,31 @@ private void createDerivedColumnV1Indices(String column, FunctionEvaluator funct Object[] outputValues = new Object[numDocs]; PinotDataType outputValueType = null; for (int i = 0; i < numDocs; i++) { + boolean hasNull = false; for (int j = 0; j < numArguments; j++) { inputValues[j] = valueReaders.get(j).getValue(i); + Object defaultNullValue = argumentsMetadata.get(j).getFieldSpec().getDefaultNullValue(); + if (inputValues[j] == null || inputValues[j] == defaultNullValue) { + hasNull = true; + break; + } } - Object outputValue = functionEvaluator.evaluate(inputValues); - outputValues[i] = outputValue; - if (outputValueType == null) { - Class<?> outputValueClass = outputValue.getClass(); - outputValueType = FunctionUtils.getArgumentType(outputValueClass); - Preconditions.checkState(outputValueType != null, "Unsupported output value class: %s", outputValueClass); + try { + Object outputValue = functionEvaluator.evaluate(inputValues); + outputValues[i] = outputValue; + if (outputValueType == null) { + Class<?> outputValueClass = outputValue.getClass(); + outputValueType = FunctionUtils.getArgumentType(outputValueClass); + Preconditions.checkState(outputValueType != null, "Unsupported output value class: %s", outputValueClass); + } + } catch (Exception e) { + if (!errorOnFailure && hasNull) { + LOGGER.warn("Caught exception while evaluating derived column: {} with function: {} and arguments: {}", Review Comment: write a sampler for this. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org