github-actions[bot] commented on code in PR #42016:
URL: https://github.com/apache/doris/pull/42016#discussion_r1804202928
##########
be/src/vec/exec/scan/scanner_context.cpp:
##########
@@ -54,54 +55,142 @@ ScannerContext::ScannerContext(RuntimeState* state, const
TupleDescriptor* outpu
_output_row_descriptor(output_row_descriptor),
_batch_size(state->batch_size()),
limit(limit_),
- _max_bytes_in_queue(std::max(max_bytes_in_blocks_queue,
(int64_t)1024) *
- num_parallel_instances),
- _scanner_scheduler(state->exec_env()->scanner_scheduler()),
+ _scanner_scheduler_global(state->exec_env()->scanner_scheduler()),
_all_scanners(scanners.begin(), scanners.end()),
- _num_parallel_instances(num_parallel_instances) {
+ _ignore_data_distribution(ignore_data_distribution) {
DCHECK(_output_row_descriptor == nullptr ||
_output_row_descriptor->tuple_descriptors().size() == 1);
_query_id = _state->get_query_ctx()->query_id();
ctx_id = UniqueId::gen_uid().to_string();
+ _scanners.enqueue_bulk(scanners.begin(), scanners.size());
+ if (limit < 0) {
+ limit = -1;
+ }
+ MAX_SCALE_UP_RATIO = _state->scanner_scale_up_ratio();
+ _query_thread_context = {_query_id, _state->query_mem_tracker(),
+ _state->get_query_ctx()->workload_group()};
+ _dependency = dependency;
+
+ DorisMetrics::instance()->scanner_ctx_cnt->increment(1);
+}
+
+// After init function call, should not access _parent
+Status ScannerContext::init() {
Review Comment:
warning: function 'init' exceeds recommended size/complexity thresholds
[readability-function-size]
```cpp
Status ScannerContext::init() {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/scan/scanner_context.cpp:77:** 146 lines including
whitespace and comments (threshold 80)
```cpp
Status ScannerContext::init() {
^
```
</details>
--
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]