private void saveValues(int specIndex, List<AggregateFunction> aggs, Object id, boolean samePartition) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException { if (aggs.isEmpty()) { return; } List<Object> row = new ArrayList<Object>(aggs.size() + 1); row.add(id); for (AggregateFunction function : aggs) { row.add(function.getResult(getContext())); if (!samePartition) { function.reset(); } } valueMapping[specIndex].insert(row, InsertMode.ORDERED, -1); }
private void saveValues(int specIndex, List<AggregateFunction> aggs, Object id, boolean samePartition) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException { if (aggs.isEmpty()) { return; } List<Object> row = new ArrayList<Object>(aggs.size() + 1); row.add(id); for (AggregateFunction function : aggs) { row.add(function.getResult(getContext())); if (!samePartition) { function.reset(); } } valueMapping[specIndex].insert(row, InsertMode.ORDERED, -1); }
private void saveValues(int specIndex, List<AggregateFunction> aggs, Object id, boolean samePartition, boolean rowValue) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException { if (aggs.isEmpty()) { return; } List<Object> row = new ArrayList<Object>(aggs.size() + 1); row.add(id); for (AggregateFunction function : aggs) { row.add(function.getResult(getContext())); if (!samePartition) { function.reset(); } } if (rowValue) { rowValueMapping[specIndex].insert(row, InsertMode.NEW, -1); } else { valueMapping[specIndex].insert(row, InsertMode.ORDERED, -1); } }
function.addInput(tuple, getContext()); function.addInput(tuple, getContext());
if (inputTs == null) { List<Expression> collectedExpressions = new ArrayList<Expression>(expressionIndexes.keySet()); Evaluator eval = new Evaluator(elementMap, getDataManager(), getContext()); final RelationalNode sourceNode = this.getChildren()[0]; inputTs = new ProjectingTupleSource(sourceNode, eval, collectedExpressions, elementMap) {
if (inputTs == null) { List<Expression> collectedExpressions = new ArrayList<Expression>(expressionIndexes.keySet()); Evaluator eval = new Evaluator(elementMap, getDataManager(), getContext()); final RelationalNode sourceNode = this.getChildren()[0]; inputTs = new ProjectingTupleSource(sourceNode, eval, collectedExpressions, elementMap) {
if (inputTs == null) { List<Expression> collectedExpressions = new ArrayList<Expression>(expressionIndexes.keySet()); Evaluator eval = new Evaluator(elementMap, getDataManager(), getContext()); final RelationalNode sourceNode = this.getChildren()[0]; inputTs = new ProjectingTupleSource(sourceNode, eval, collectedExpressions, elementMap) {
function.addInput(tuple, getContext());
function.addInput(tuple, getContext());
for (AggregateFunction function : aggs) { if (function instanceof NthValue) { ((NthValue) function).addInput(frameTuple, getContext(), start, end, sorted); } else { function.addInput(frameTuple, getContext());
for (AggregateFunction function : aggs) { if (function instanceof NthValue) { ((NthValue) function).addInput(frameTuple, getContext(), start, end, sorted); } else { function.addInput(frameTuple, getContext());