private IValueExpression convertAggregates(final BOp exprNode) { IValueExpression expr; final BOp[] args = new BOp[exprNode.args().size()]; if (exprNode!=null && exprNode.arity()>0) { for (int i=0; i<exprNode.args().size(); i++) { final BOp arg = exprNode.args().get(i); final IValueExpression newValue = convertAggregates(arg); if (newValue!=null) { args[i] = newValue; } else { args[i] = arg; } } } if (exprNode instanceof FunctionNode) { if ((exprNode instanceof FunctionNode) && FunctionRegistry.isAggregate(((FunctionNode) exprNode).getFunctionURI())) { expr = new AggregateBase(args, null) { @Override public void reset() {} @Override public IV done() { return null; } }; } else { expr = new UnknownFunctionBOp(args, null); } } else { expr = null; } return expr; }
private IValueExpression convertAggregates(final BOp exprNode) { IValueExpression expr; final BOp[] args = new BOp[exprNode.args().size()]; if (exprNode!=null && exprNode.arity()>0) { for (int i=0; i<exprNode.args().size(); i++) { final BOp arg = exprNode.args().get(i); final IValueExpression newValue = convertAggregates(arg); if (newValue!=null) { args[i] = newValue; } else { args[i] = arg; } } } if (exprNode instanceof FunctionNode) { if ((exprNode instanceof FunctionNode) && FunctionRegistry.isAggregate(((FunctionNode) exprNode).getFunctionURI())) { expr = new AggregateBase(args, null) { @Override public void reset() {} @Override public IV done() { return null; } }; } else { expr = new UnknownFunctionBOp(args, null); } } else { expr = null; } return expr; }
final IValueExpressionNode exprNode = n.getValueExpressionNode(); if (expr == null && exprNode instanceof FunctionNode) { expr = convertAggregates((FunctionNode)exprNode); final BOp expr = convertAggregates(exprNode); exprs2[i] = new SPARQLConstraint<XSDBooleanIV<BigdataLiteral>>(new BOp[]{ expr}, null);
final IValueExpressionNode exprNode = n.getValueExpressionNode(); if (expr == null && exprNode instanceof FunctionNode) { expr = convertAggregates((FunctionNode)exprNode); final BOp expr = convertAggregates(exprNode); exprs2[i] = new SPARQLConstraint<XSDBooleanIV<BigdataLiteral>>(new BOp[]{ expr}, null);