morningman commented on code in PR #22115: URL: https://github.com/apache/doris/pull/22115#discussion_r1273801864
########## be/src/vec/exec/scan/vscan_node.cpp: ########## @@ -113,6 +113,15 @@ Status VScanNode::init(const TPlanNode& tnode, RuntimeState* state) { } else { _max_pushdown_conditions_per_column = config::max_pushdown_conditions_per_column; } + + if (tnode.__isset.push_down_agg_type_opt) { + _push_down_agg_type = tnode.push_down_agg_type_opt; + } else if (tnode.olap_scan_node.__isset.push_down_agg_type_opt) { Review Comment: Add some comment in code to explain these compatibility work ########## be/src/vec/exec/format/orc/vorc_reader.cpp: ########## @@ -1370,6 +1372,23 @@ std::string OrcReader::_get_field_name_lower_case(const orc::Type* orc_type, int } Status OrcReader::get_next_block(Block* block, size_t* read_rows, bool* eof) { + if (_push_down_agg_type == TPushAggOp::type::COUNT) { + auto rows = std::min(get_remaining_rows(), (int64_t)_batch_size); + + set_remaining_rows(get_remaining_rows() - rows); + + for (auto& col : block->mutate_columns()) { + col->resize(rows); + } + + *read_rows = rows; Review Comment: duplicate with line 1388 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org