diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 4ba17b33e629..29d691dd937f 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -69,7 +69,7 @@ if(VELOX_ENABLE_ARROW) ExternalProject_Add( arrow_ep PREFIX ${ARROW_PREFIX} - URL "https://dlcdn.apache.org/arrow/arrow-8.0.0/apache-arrow-8.0.0.tar.gz" + URL "https://dlcdn.apache.org/arrow/arrow-11.0.0/apache-arrow-11.0.0.tar.gz" SOURCE_SUBDIR cpp CMAKE_ARGS ${ARROW_CMAKE_ARGS} BUILD_BYPRODUCTS ${ARROW_LIBDIR}/libarrow.a ${ARROW_LIBDIR}/libparquet.a diff --git a/velox/dwio/parquet/writer/Writer.cpp b/velox/dwio/parquet/writer/Writer.cpp index a2d72c2a0a84..33f29d3106c1 100644 --- a/velox/dwio/parquet/writer/Writer.cpp +++ b/velox/dwio/parquet/writer/Writer.cpp @@ -33,13 +33,12 @@ void Writer::write(const RowVectorPtr& data) { if (!arrowWriter_) { stream_ = std::make_shared(pool_); auto arrowProperties = ::parquet::ArrowWriterProperties::Builder().build(); - PARQUET_THROW_NOT_OK(::parquet::arrow::FileWriter::Open( + PARQUET_ASSIGN_OR_THROW(arrowWriter_, ::parquet::arrow::FileWriter::Open( *recordBatch->schema(), arrow::default_memory_pool(), stream_, properties_, - arrowProperties, - &arrowWriter_)); + arrowProperties)); } PARQUET_THROW_NOT_OK(arrowWriter_->WriteTable(*table, 10000));