Source:
public Object visitCall(CallExpression node, Object context) { List<Type> argumentTypes = new ArrayList<>(); List<Object> argumentValues = new ArrayList<>(); for (RowExpression expression : node.getArguments()) { Object value = expression.accept(this, context); argumentValues.add(value); argumentTypes.add(expression.getType()); } FunctionHandle functionHandle = node.getFunctionHandle(); if (functionHandle.getSignature().getName().toUpperCase().equals(ARRAY_CONSTRUCTOR)) { SpecialCallResult result = tryHandleArrayConstructor(node, argumentValues); if (result.isHandled()) { return result.getValue(); } } if (isCast(functionHandle)) { SpecialCallResult result = tryHandleCast(node, argumentValues); if (result.isHandled()) { return result.getValue(); } } StandardFunctionResolution resolution = new StandardFunctionResolution(metadata.getFunctionManager()); if (resolution.isLikeFunction(functionHandle)) { SpecialCallResult result = tryHandleLike(node, argumentValues, argumentTypes, context); if (result.isHandled()) { return result.getValue(); } } ScalarFunctionImplementation function = metadata.getFunctionManager().getScalarFunctionImplementation(functionHandle); for (int i = 0; i < argumentValues.size(); i++) { Object value = argumentValues.get(i); if (value == null && function.getArgumentProperty(i).getNullConvention() == RETURN_NULL_ON_NULL) { return null; } } if (optimize && (!function.isDeterministic() || hasUnresolvedValue(argumentValues) || functionHandle.getSignature().getName().equals("fail"))) { return call(functionHandle, node.getType(), toRowExpressions(argumentValues, argumentTypes)); } return functionInvoker.invoke(functionHandle, session.toConnectorSession(), argumentValues); }

Target:
public Object visitCall(CallExpression node, Object context) { List<Type> argumentTypes = new ArrayList<>(); List<Object> argumentValues = new ArrayList<>(); for (RowExpression expression : node.getArguments()) { Object value = expression.accept(this, context); argumentValues.add(value); argumentTypes.add(expression.getType()); } FunctionHandle functionHandle = node.getFunctionHandle(); if (functionHandle.getSignature().getName().toUpperCase().equals(ARRAY_CONSTRUCTOR)) { SpecialCallResult result = tryHandleArrayConstructor(node, argumentValues); if (result.isChanged()) { return result.getValue(); } } if (resolution.isCastFunction(functionHandle)) { SpecialCallResult result = tryHandleCast(node, argumentValues); if (result.isChanged()) { return result.getValue(); } } if (resolution.isLikeFunction(functionHandle)) { SpecialCallResult result = tryHandleLike(node, argumentValues, argumentTypes, context); if (result.isChanged()) { return result.getValue(); } } ScalarFunctionImplementation function = metadata.getFunctionManager().getScalarFunctionImplementation(functionHandle); for (int i = 0; i < argumentValues.size(); i++) { Object value = argumentValues.get(i); if (value == null && function.getArgumentProperty(i).getNullConvention() == RETURN_NULL_ON_NULL) { return null; } } if (optimize && (!function.isDeterministic() || hasUnresolvedValue(argumentValues) || functionHandle.getSignature().getName().equals("fail"))) { return call(functionHandle, node.getType(), toRowExpressions(argumentValues, argumentTypes)); } return functionInvoker.invoke(functionHandle, session.toConnectorSession(), argumentValues); }