Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit b81d607

Browse files
committed
naive tbb
fix win build calcite enable 512 kb is optimal
1 parent dd2e576 commit b81d607

File tree

5 files changed

+228
-141
lines changed

5 files changed

+228
-141
lines changed

omniscidb/QueryEngine/ColumnFetcher.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ JoinColumn ColumnFetcher::makeJoinColumn(
147147
data_provider,
148148
column_cache);
149149
if (col_buff != nullptr) {
150+
join_chunk_array[num_chunks] = JoinChunk{col_buff, elem_count, num_elems};
150151
num_elems += elem_count;
151-
join_chunk_array[num_chunks] = JoinChunk{col_buff, elem_count};
152152
} else {
153153
continue;
154154
}
@@ -359,12 +359,12 @@ const int8_t* ColumnFetcher::getAllTableColumnFragments(
359359

360360
std::vector<int8_t*> raw_write_ptrs;
361361
raw_write_ptrs.reserve(frag_count);
362-
for (uint i = 0; i < frag_count; i++) {
362+
for (size_t i = 0; i < frag_count; i++) {
363363
raw_write_ptrs.emplace_back(write_ptrs[i].first);
364364
}
365365

366-
std::unique_ptr<ColumnarResults> merged_results(
367-
new ColumnarResults(raw_write_ptrs, total_row_count, col_info->type, thread_idx));
366+
std::unique_ptr<ColumnarResults> merged_results(new ColumnarResults(
367+
std::move(raw_write_ptrs), total_row_count, col_info->type, thread_idx));
368368

369369
table_column = merged_results.get();
370370
columnarized_scan_table_cache_.emplace(std::make_pair(table_id, col_id),

omniscidb/QueryEngine/JoinHashTable/Builders/PerfectHashTableBuilder.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ class PerfectJoinHashTableBuilder {
166166
0);
167167

168168
auto cpu_hash_table_buff = reinterpret_cast<int32_t*>(hash_table_->getCpuBuffer());
169-
// const int thread_count = cpu_threads();
170-
// std::vector<std::thread> init_cpu_buff_threads;
171169

172170
{
173171
auto timer_init = DEBUG_TIMER("CPU One-To-One Perfect-Hash: init_hash_join_buff");
@@ -176,13 +174,11 @@ class PerfectJoinHashTableBuilder {
176174
hash_join_invalid_val);
177175
}
178176
const bool for_semi_join = for_semi_anti_join(join_type);
179-
// std::atomic<int> err{0};
180177
{
181178
auto timer_fill =
182-
DEBUG_TIMER("CPU One-To-One Perfect-Hash: fill_hash_join_buff_bucketized");
179+
DEBUG_TIMER("CPU One-To-One Perfect-Hash: fill_hash_join_buff_bucketized_cpu");
183180

184181
{
185-
// int partial_err = 0;
186182
JoinColumnTypeInfo type_info{static_cast<size_t>(type->size()),
187183
col_range.getIntMin(),
188184
col_range.getIntMax(),
@@ -204,7 +200,6 @@ class PerfectJoinHashTableBuilder {
204200
if (error) {
205201
// Too many hash entries, need to retry with a 1:many table
206202
hash_table_ = nullptr; // clear the hash table buffer
207-
// LOG(ERROR) << "cpu hash_tabel error: " << error;
208203
throw NeedsOneToManyHash();
209204
}
210205
}

0 commit comments

Comments
 (0)