github-actions[bot] commented on code in PR #18457:
URL: https://github.com/apache/doris/pull/18457#discussion_r1162253923
##########
be/src/vec/exec/scan/pip_scanner_context.h:
##########
@@ -67,19 +69,57 @@ class PipScannerContext : public vectorized::ScannerContext
{
const int queue_size = _queue_mutexs.size();
const int block_size = blocks.size();
int64_t local_bytes = 0;
- for (const auto& block : blocks) {
- local_bytes += block->allocated_bytes();
- }
- for (int i = 0; i < queue_size && i < block_size; ++i) {
- int queue = _next_queue_to_feed;
- {
- std::lock_guard<std::mutex> l(*_queue_mutexs[queue]);
- for (int j = i; j < block_size; j += queue_size) {
- _blocks_queues[queue].emplace_back(std::move(blocks[j]));
+ if (_need_colocate_distribute) {
+ std::vector<uint64_t> hash_vals;
+ for (const auto& block : blocks) {
+ // vectorized calculate hash
+ int rows = block->rows();
+ const auto element_size = _max_queue_size;
+ hash_vals.resize(rows);
+ std::fill(hash_vals.begin(), hash_vals.end(), 0);
+ auto* __restrict hashes = hash_vals.data();
+
+ for (int j = 0; j < _col_distribute_ids.size(); ++j) {
+ DCHECK_GT(block->columns(), _col_distribute_ids[j]) <<
"happen lee:" << print_id(_state->query_id());
Review Comment:
warning: member access into incomplete type 'doris::RuntimeState'
[clang-diagnostic-error]
```cpp
DCHECK_GT(block->columns(), _col_distribute_ids[j]) <<
"happen lee:" << print_id(_state->query_id());
^
```
**be/src/udf/udf.h:41:** forward declaration of 'doris::RuntimeState'
```cpp
class RuntimeState;
^
```
##########
be/src/vec/exec/scan/pip_scanner_context.h:
##########
@@ -67,19 +69,57 @@
const int queue_size = _queue_mutexs.size();
const int block_size = blocks.size();
int64_t local_bytes = 0;
- for (const auto& block : blocks) {
- local_bytes += block->allocated_bytes();
- }
- for (int i = 0; i < queue_size && i < block_size; ++i) {
- int queue = _next_queue_to_feed;
- {
- std::lock_guard<std::mutex> l(*_queue_mutexs[queue]);
- for (int j = i; j < block_size; j += queue_size) {
- _blocks_queues[queue].emplace_back(std::move(blocks[j]));
+ if (_need_colocate_distribute) {
+ std::vector<uint64_t> hash_vals;
+ for (const auto& block : blocks) {
+ // vectorized calculate hash
+ int rows = block->rows();
+ const auto element_size = _max_queue_size;
+ hash_vals.resize(rows);
+ std::fill(hash_vals.begin(), hash_vals.end(), 0);
+ auto* __restrict hashes = hash_vals.data();
+
+ for (int j = 0; j < _col_distribute_ids.size(); ++j) {
+ DCHECK_GT(block->columns(), _col_distribute_ids[j]) <<
"happen lee:" << print_id(_state->query_id());
+ DCHECK_NE(block->get_by_position(_col_distribute_ids[j])
+ .column.get(), nullptr) << "happen lee:"
<< print_id(_state->query_id());
Review Comment:
warning: member access into incomplete type 'doris::RuntimeState'
[clang-diagnostic-error]
```cpp
.column.get(), nullptr) << "happen
lee:" << print_id(_state->query_id());
^
```
**be/src/udf/udf.h:41:** forward declaration of 'doris::RuntimeState'
```cpp
class RuntimeState;
^
```
--
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]