public BuiltInFunctionInfo(Class<? extends FunctionExpression> f, BuiltInFunction d) { this.name = SchemaUtil.normalizeIdentifier(d.name()); this.func = f; this.funcCtor = d.nodeClass() == FunctionParseNode.class ? getExpressionCtor(f, null) : null; this.nodeCtor = d.nodeClass() == FunctionParseNode.class ? null : getParseNodeCtor(d.nodeClass()); this.args = new BuiltInFunctionArgInfo[d.args().length]; int requiredArgCount = 0; for (int i = 0; i < args.length; i++) { this.args[i] = new BuiltInFunctionArgInfo(d.args()[i]); if (this.args[i].getDefaultValue() == null) { requiredArgCount = i + 1; } } this.requiredArgCount = requiredArgCount; this.isAggregate = AggregateFunction.class.isAssignableFrom(f); this.classType = d.classType(); this.derivedFunctions = d.derivedFunctions(); }
public BuiltInFunctionInfo(Class<? extends FunctionExpression> f, BuiltInFunction d) { this.name = SchemaUtil.normalizeIdentifier(d.name()); this.func = f; this.funcCtor = d.nodeClass() == FunctionParseNode.class ? getExpressionCtor(f, null) : null; this.nodeCtor = d.nodeClass() == FunctionParseNode.class ? null : getParseNodeCtor(d.nodeClass()); this.args = new BuiltInFunctionArgInfo[d.args().length]; int requiredArgCount = 0; for (int i = 0; i < args.length; i++) { this.args[i] = new BuiltInFunctionArgInfo(d.args()[i]); if (this.args[i].getDefaultValue() == null) { requiredArgCount = i + 1; } } this.requiredArgCount = requiredArgCount; this.isAggregate = AggregateFunction.class.isAssignableFrom(f); this.classType = d.classType(); this.derivedFunctions = d.derivedFunctions(); }
public BuiltInFunctionInfo(Class<? extends FunctionExpression> f, BuiltInFunction d) { this.name = SchemaUtil.normalizeIdentifier(d.name()); this.func = f; this.funcCtor = d.nodeClass() == FunctionParseNode.class ? getExpressionCtor(f, null) : null; this.nodeCtor = d.nodeClass() == FunctionParseNode.class ? null : getParseNodeCtor(d.nodeClass()); this.args = new BuiltInFunctionArgInfo[d.args().length]; int requiredArgCount = 0; for (int i = 0; i < args.length; i++) { this.args[i] = new BuiltInFunctionArgInfo(d.args()[i]); if (this.args[i].getDefaultValue() == null) { requiredArgCount = i + 1; } } this.requiredArgCount = requiredArgCount; this.isAggregate = AggregateFunction.class.isAssignableFrom(f); this.classType = d.classType(); this.derivedFunctions = d.derivedFunctions(); }