yiguolei commented on code in PR #62835:
URL: https://github.com/apache/doris/pull/62835#discussion_r3141971332
##########
be/src/exec/scan/file_scanner.cpp:
##########
@@ -220,6 +235,111 @@ Status FileScanner::init(RuntimeState* state, const
VExprContextSPtrs& conjuncts
return Status::OK();
}
+bool FileScanner::_should_enable_adaptive_batch_size(TFileFormatType::type
format_type) const {
+ // Only enable for readers that support set_batch_size().
+ // Table-format wrappers are covered because they delegate to native
readers.
+ if (!config::enable_adaptive_batch_size) {
+ return false;
+ }
+ switch (format_type) {
+ case TFileFormatType::FORMAT_PARQUET:
+ case TFileFormatType::FORMAT_ORC:
+ case TFileFormatType::FORMAT_CSV_PLAIN:
+ case TFileFormatType::FORMAT_CSV_GZ:
+ case TFileFormatType::FORMAT_CSV_BZ2:
+ case TFileFormatType::FORMAT_CSV_LZ4FRAME:
+ case TFileFormatType::FORMAT_CSV_LZ4BLOCK:
+ case TFileFormatType::FORMAT_CSV_LZOP:
+ case TFileFormatType::FORMAT_CSV_DEFLATE:
+ case TFileFormatType::FORMAT_CSV_SNAPPYBLOCK:
+ case TFileFormatType::FORMAT_PROTO:
+ case TFileFormatType::FORMAT_TEXT:
+ case TFileFormatType::FORMAT_JSON:
+ case TFileFormatType::FORMAT_JNI:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool FileScanner::_should_run_adaptive_batch_size() const {
+ return _block_size_predictor != nullptr && _get_push_down_agg_type() !=
TPushAggOp::type::COUNT;
Review Comment:
为什么这个adptive 会跟push agg op 有关系? 可以注释注明
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]