Avoid SerDe for aggregation query with object pool (#1854)

This commit is contained in:
kangkaisen
2019-09-26 13:51:13 +08:00
committed by Mingyu Chen
parent 7df1418ff4
commit b246d93128
28 changed files with 194 additions and 114 deletions

View File

@ -530,6 +530,25 @@ void ExecNode::collect_scan_nodes(vector<ExecNode*>* nodes) {
collect_nodes(TPlanNodeType::ES_HTTP_SCAN_NODE, nodes);
}
void ExecNode::try_do_aggregate_serde_improve() {
std::vector<ExecNode*> agg_node;
collect_nodes(TPlanNodeType::AGGREGATION_NODE, &agg_node);
if (agg_node.size() != 1) {
return;
}
if (agg_node[0]->_children.size() != 1) {
return;
}
if (agg_node[0]->_children[0]->type() != TPlanNodeType::OLAP_SCAN_NODE) {
return;
}
OlapScanNode* scan_node = static_cast<OlapScanNode*>(agg_node[0]->_children[0]);
scan_node->set_no_agg_finalize();
}
void ExecNode::init_runtime_profile(const std::string& name) {
std::stringstream ss;
ss << name << " (id=" << _id << ")";