Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/velox/benchmarks/PlanValidatorUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ int main(int argc, char** argv) {
std::unordered_map<std::string, std::string> conf;
conf.insert({kDebugModeEnabled, "true"});
initVeloxBackend(conf);
auto pool = defaultLeafVeloxMemoryPool().get();
SubstraitToVeloxPlanValidator planValidator(pool);
auto pool = defaultLeafVeloxMemoryPool();
SubstraitToVeloxPlanValidator planValidator(pool.get());

::substrait::Plan subPlan;
parseProtobuf(reinterpret_cast<uint8_t*>(plan.data()), plan.size(), &subPlan);
Expand Down
8 changes: 4 additions & 4 deletions cpp/velox/jni/VeloxJniWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ Java_org_apache_gluten_vectorized_PlanEvaluatorJniWrapper_nativeValidateWithFail
}
}

const auto pool = defaultLeafVeloxMemoryPool().get();
SubstraitToVeloxPlanValidator planValidator(pool);
auto pool = defaultLeafVeloxMemoryPool();
SubstraitToVeloxPlanValidator planValidator(pool.get());
::substrait::Plan subPlan;
parseProtobuf(planData, planSize, &subPlan);

Expand Down Expand Up @@ -252,8 +252,8 @@ JNIEXPORT jboolean JNICALL Java_org_apache_gluten_vectorized_PlanEvaluatorJniWra
env->DeleteLocalRef(mapping);
}

auto pool = defaultLeafVeloxMemoryPool().get();
SubstraitToVeloxPlanValidator planValidator(pool);
auto pool = defaultLeafVeloxMemoryPool();
SubstraitToVeloxPlanValidator planValidator(pool.get());
auto inputType = SubstraitParser::parseType(inputSubstraitType);
if (inputType->kind() != TypeKind::ROW) {
throw GlutenException("Input type is not a RowType.");
Expand Down
3 changes: 2 additions & 1 deletion cpp/velox/substrait/SubstraitToVeloxPlan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,11 @@ core::PlanNodePtr SubstraitToVeloxPlanConverter::constructValuesNode(
// It loads all data from the iterator at plan construction time
VELOX_CHECK_LT(streamIdx, inputIters_.size(), "Could not find stream index {} in input iterator list.", streamIdx);
const auto iter = std::move(inputIters_[streamIdx]);
auto pool = defaultLeafVeloxMemoryPool();
std::vector<RowVectorPtr> rowVectors;
while (iter->hasNext()) {
auto batch = iter->next();
auto veloxBatch = VeloxColumnarBatch::from(defaultLeafVeloxMemoryPool().get(), batch);
auto veloxBatch = VeloxColumnarBatch::from(pool.get(), batch);
rowVectors.emplace_back(veloxBatch->getRowVector());
}
auto node = std::make_shared<facebook::velox::core::ValuesNode>(nextPlanNodeId(), std::move(rowVectors));
Expand Down
3 changes: 2 additions & 1 deletion cpp/velox/utils/VeloxArrowUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ arrow::Result<std::shared_ptr<ColumnarBatch>> recordBatch2VeloxColumnarBatch(con
ArrowArray arrowArray;
ArrowSchema arrowSchema;
RETURN_NOT_OK(arrow::ExportRecordBatch(rb, &arrowArray, &arrowSchema));
auto vp = velox::importFromArrowAsOwner(arrowSchema, arrowArray, gluten::defaultLeafVeloxMemoryPool().get());
auto pool = gluten::defaultLeafVeloxMemoryPool();
auto vp = velox::importFromArrowAsOwner(arrowSchema, arrowArray, pool.get());
return std::make_shared<VeloxColumnarBatch>(std::dynamic_pointer_cast<velox::RowVector>(vp));
}

Expand Down
Loading