public EvalNode visitCountRowsFunction(Context ctx, Stack<Expr> stack, CountRowsFunctionExpr expr)
throws PlanningException {
FunctionDesc countRows = catalog.getFunction("count", CatalogProtos.FunctionType.AGGREGATION,
new TajoDataTypes.DataType[] {});
if (countRows == null) {
throw new NoSuchFunctionException(countRows.getSignature(), new TajoDataTypes.DataType[]{});
}
try {
ctx.currentBlock.setAggregationRequire();
return new AggregationFunctionCallEval(countRows, (AggFunction) countRows.newInstance(),
new EvalNode[] {});
} catch (InternalException e) {
throw new NoSuchFunctionException(countRows.getSignature(), new TajoDataTypes.DataType[]{});
}
}