diff --git a/cpp/velox/substrait/VeloxToSubstraitPlan.h b/cpp/velox/substrait/VeloxToSubstraitPlan.h index 701d57aedb29..42a0a1bd99d7 100644 --- a/cpp/velox/substrait/VeloxToSubstraitPlan.h +++ b/cpp/velox/substrait/VeloxToSubstraitPlan.h @@ -104,7 +104,7 @@ class VeloxToSubstraitPlanConvertor { /// The Type converter used to conver velox representation into Substrait /// type. - std::shared_ptr typeConvertor_; + std::shared_ptr typeConvertor_ = std::make_shared(); /// The Extension collector storing the relations between the function /// signature and the function reference number. diff --git a/cpp/velox/tests/VeloxToSubstraitTypeTest.cc b/cpp/velox/tests/VeloxToSubstraitTypeTest.cc index ea8ff790b26b..e7d637ddbb99 100644 --- a/cpp/velox/tests/VeloxToSubstraitTypeTest.cc +++ b/cpp/velox/tests/VeloxToSubstraitTypeTest.cc @@ -37,7 +37,7 @@ class VeloxToSubstraitTypeTest : public ::testing::Test { << "Expected: " << type->toString() << ", but got: " << sameType->toString(); } - std::shared_ptr typeConvertor_; + std::shared_ptr typeConvertor_ = std::make_shared(); }; TEST_F(VeloxToSubstraitTypeTest, basic) {