fn summary_children(expr: &SummaryExpr) -> Vec<&Rc<SummaryNode>> {
match expr {
SummaryExpr::KeepPreAsap(_) => vec![],
SummaryExpr::BinaryOp { lhs, rhs, .. } => vec![lhs, rhs],
SummaryExpr::CandidateTopK { candidates, values, .. } => vec![candidates, values],
SummaryExpr::ValueOperation { child, .. } => vec![child],
SummaryExpr::RelationalJoin { left, right, .. } => vec![left, right],
SummaryExpr::SummaryAgg { child, .. } => vec![child],
SummaryExpr::SummaryJoin { outer, inner, .. } => vec![outer, inner],
SummaryExpr::SummarySubtract { left, right } => vec![left, right],
SummaryExpr::SummaryDelete { summary_input, .. } => vec![summary_input],
SummaryExpr::SummaryEstimate { summary_input, .. } => vec![summary_input],
SummaryExpr::SummaryMerge { children } => children.iter().collect(),
}
}
I don't know what is the design principle of these branches. For example, I cannot understand
I feel there are a lot of semantic overlaps in the post-ASAP-DAG language and am really lost.
See the following code
I don't know what is the design principle of these branches. For example, I cannot understand
ValueOperationis a parallel concept withBinaryOp:BinaryOplooks like a special case of projection, which is a sub-concept ofValueOperation.KeepPreASAPis a parallel concept withValueOperation: They both contain lots of repeated concepts, like projection, filter, so on and so forthExactAggregateinSummaryAggand the original aggregation inKeepPreAsap?I feel there are a lot of semantic overlaps in the post-ASAP-DAG language and am really lost.