| 665 | } |
| 666 | |
| 667 | void AR_EXP_Aggregate(AR_ExpNode *root, const Record r) { |
| 668 | if(AGGREGATION_NODE(root)) { |
| 669 | AR_EXP_Result res = _AR_EXP_EvaluateFunctionCall(root, r, NULL); |
| 670 | if(res == EVAL_ERR) { |
| 671 | ErrorCtx_RaiseRuntimeException(NULL); // Raise an exception if we're in a run-time context. |
| 672 | return; |
| 673 | } |
| 674 | } else if(AR_EXP_IsOperation(root)) { |
| 675 | // keep searching for aggregation nodes |
| 676 | for(int i = 0; i < root->op.child_count; i++) { |
| 677 | AR_ExpNode *child = root->op.children[i]; |
| 678 | AR_EXP_Aggregate(child, r); |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | void _AR_EXP_FinalizeAggregations |
| 684 | ( |
no test coverage detected