This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 6422a5d4f7 [improvement](arrow) add arrow block convertion time profile (#11072) 6422a5d4f7 is described below commit 6422a5d4f7cc294801eff7037cc3a8ee7d092048 Author: Mingyu Chen <morningman....@gmail.com> AuthorDate: Fri Jul 22 22:11:33 2022 +0800 [improvement](arrow) add arrow block convertion time profile (#11072) * [improvement](arrow) add arrow block convertion time profile --- be/src/vec/exec/file_arrow_scanner.cpp | 5 ++++- be/src/vec/exec/file_arrow_scanner.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/be/src/vec/exec/file_arrow_scanner.cpp b/be/src/vec/exec/file_arrow_scanner.cpp index bd1428e820..702dae9a6e 100644 --- a/be/src/vec/exec/file_arrow_scanner.cpp +++ b/be/src/vec/exec/file_arrow_scanner.cpp @@ -37,7 +37,9 @@ FileArrowScanner::FileArrowScanner(RuntimeState* state, RuntimeProfile* profile, _cur_file_reader(nullptr), _cur_file_eof(false), _batch(nullptr), - _arrow_batch_cur_idx(0) {} + _arrow_batch_cur_idx(0) { + _convert_arrow_block_timer = ADD_TIMER(_profile, "ConvertArrowBlockTimer"); +} FileArrowScanner::~FileArrowScanner() { FileArrowScanner::close(); @@ -176,6 +178,7 @@ Status FileArrowScanner::get_next(vectorized::Block* block, bool* eof) { } Status FileArrowScanner::_append_batch_to_block(Block* block) { + SCOPED_TIMER(_convert_arrow_block_timer); size_t num_elements = std::min<size_t>((_state->batch_size() - block->rows()), (_batch->num_rows() - _arrow_batch_cur_idx)); for (auto i = 0; i < _file_slot_descs.size(); ++i) { diff --git a/be/src/vec/exec/file_arrow_scanner.h b/be/src/vec/exec/file_arrow_scanner.h index 46117cecb0..93e391af92 100644 --- a/be/src/vec/exec/file_arrow_scanner.h +++ b/be/src/vec/exec/file_arrow_scanner.h @@ -70,6 +70,7 @@ private: bool _cur_file_eof; // is read over? std::shared_ptr<arrow::RecordBatch> _batch; size_t _arrow_batch_cur_idx; + RuntimeProfile::Counter* _convert_arrow_block_timer; }; class VFileParquetScanner final : public FileArrowScanner { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org