diff --git a/cpp/src/arrow/io/memory.cc b/cpp/src/arrow/io/memory.cc index 1cde5e64e01..361895494e1 100644 --- a/cpp/src/arrow/io/memory.cc +++ b/cpp/src/arrow/io/memory.cc @@ -54,7 +54,6 @@ BufferOutputStream::BufferOutputStream(const std::shared_ptr& b Result> BufferOutputStream::Create( int64_t initial_capacity, MemoryPool* pool) { // ctor is private, so cannot use make_shared - DCHECK_NE(pool, nullptr); auto ptr = std::shared_ptr(new BufferOutputStream); RETURN_NOT_OK(ptr->Reset(initial_capacity, pool)); return ptr; diff --git a/cpp/src/jni/orc/jni_wrapper.cpp b/cpp/src/jni/orc/jni_wrapper.cpp index a3419280e73..e6fc82312d5 100644 --- a/cpp/src/jni/orc/jni_wrapper.cpp +++ b/cpp/src/jni/orc/jni_wrapper.cpp @@ -226,7 +226,7 @@ Java_org_apache_arrow_adapter_orc_OrcStripeReaderJniWrapper_getSchema(JNIEnv* en auto schema = stripe_reader->schema(); - auto maybe_buffer = arrow::ipc::SerializeSchema(*schema, nullptr); + auto maybe_buffer = arrow::ipc::SerializeSchema(*schema, arrow::default_memory_pool()); if (!maybe_buffer.ok()) { return nullptr; }