hsyuan commented on a change in pull request #1405: [CALCITE-2772] Support
varargs UDF for scalar function
URL: https://github.com/apache/calcite/pull/1405#discussion_r331294023
##########
File path:
core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java
##########
@@ -319,11 +319,12 @@ private static SqlOperator toOp(RelDataTypeFactory
typeFactory,
}
final FamilyOperandTypeChecker typeChecker =
OperandTypes.family(typeFamilies, i ->
- function.getParameters().get(i).isOptional());
+ function.getParameters().get(i).isOptional(),
+ function.isVarArgs());
final List<RelDataType> paramTypes = toSql(typeFactory, argTypes);
if (function instanceof ScalarFunction) {
return new SqlUserDefinedFunction(name, infer((ScalarFunction) function),
- InferTypes.explicit(argTypes), typeChecker, paramTypes, function);
+ InferTypes.explicit(argTypes), typeChecker, paramTypes,
function.isVarArgs(), function);
Review comment:
Can you break lines so that it can fit 80 chars?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services