use of com.alibaba.cobar.parser.ast.expression.primary.function.FunctionExpression in project cobar by alibaba.
the class Dimension2PartitionFunction method constructFunction.
@Override
public FunctionExpression constructFunction(List<Expression> arguments) {
if (arguments == null || arguments.size() != 2)
throw new IllegalArgumentException("function " + getFunctionName() + " must have 2 arguments but is " + arguments);
Object[] args = new Object[arguments.size()];
int i = -1;
for (Expression arg : arguments) {
args[++i] = arg;
}
return (FunctionExpression) constructMe(args);
}
use of com.alibaba.cobar.parser.ast.expression.primary.function.FunctionExpression in project cobar by alibaba.
the class PartitionByString method constructFunction.
@Override
public FunctionExpression constructFunction(List<Expression> arguments) {
if (arguments == null || arguments.size() != 1) {
throw new IllegalArgumentException("function " + getFunctionName() + " must have 1 argument but is " + arguments);
}
Object[] args = new Object[arguments.size()];
int i = -1;
for (Expression arg : arguments) {
args[++i] = arg;
}
return (FunctionExpression) constructMe(args);
}
Aggregations