[Refactor] Fixes some be typo part 2 (#4747)
This commit is contained in:
@ -200,30 +200,30 @@ TEST_F(BinaryOpTest, SimplePerformanceTest) {
|
||||
ASSERT_TRUE(expr != NULL);
|
||||
ASSERT_TRUE(expr->prepare(runtime_state(), *row_desc()).ok());
|
||||
int size = 1024 * 1024 / capacity;
|
||||
VectorizedRowBatch* vec_row_batchs[size];
|
||||
VectorizedRowBatch* vec_row_batches[size];
|
||||
srand(time(NULL));
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
vec_row_batchs[i] = object_pool()->add(
|
||||
vec_row_batches[i] = object_pool()->add(
|
||||
new VectorizedRowBatch(_schema, capacity));
|
||||
MemPool* mem_pool = vec_row_batchs[i]->mem_pool();
|
||||
MemPool* mem_pool = vec_row_batches[i]->mem_pool();
|
||||
int32_t* vec_data = reinterpret_cast<int32_t*>(
|
||||
mem_pool->allocate(sizeof(int32_t) * capacity));
|
||||
vec_row_batchs[i]->column(0)->set_col_data(vec_data);
|
||||
vec_row_batches[i]->column(0)->set_col_data(vec_data);
|
||||
|
||||
for (int i = 0; i < capacity; ++i) {
|
||||
vec_data[i] = rand() % 20;
|
||||
}
|
||||
|
||||
vec_row_batchs[i]->set_size(capacity);
|
||||
vec_row_batches[i]->set_size(capacity);
|
||||
}
|
||||
|
||||
RowBatch* row_batchs[size];
|
||||
RowBatch* row_batches[size];
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
row_batchs[i] = object_pool()->add(new RowBatch(*row_desc(), capacity));
|
||||
vec_row_batchs[i]->to_row_batch(
|
||||
row_batchs[i],
|
||||
row_batches[i] = object_pool()->add(new RowBatch(*row_desc(), capacity));
|
||||
vec_row_batches[i]->to_row_batch(
|
||||
row_batches[i],
|
||||
*runtime_state()->desc_tbl().get_tuple_descriptor(0));
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ TEST_F(BinaryOpTest, SimplePerformanceTest) {
|
||||
stopwatch.start();
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
expr->evaluate(vec_row_batchs[i]);
|
||||
expr->evaluate(vec_row_batches[i]);
|
||||
}
|
||||
|
||||
uint64_t vec_time = stopwatch.elapsed_time();
|
||||
@ -241,7 +241,7 @@ TEST_F(BinaryOpTest, SimplePerformanceTest) {
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
for (int j = 0; j < capacity; ++j) {
|
||||
ExecNode::eval_conjuncts(&expr, 1, row_batchs[i]->get_row(j));
|
||||
ExecNode::eval_conjuncts(&expr, 1, row_batches[i]->get_row(j));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user