Skip to content

Commit

Permalink
Merge pull request #11669 from OSGeo/backport-11666-to-release/3.10
Browse files Browse the repository at this point in the history
[Backport release/3.10] Parquet: fix compiler deprecation warning with libarrow 19.0
  • Loading branch information
rouault authored Jan 16, 2025
2 parents 5b3688a + b36072f commit 438e1bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ogr/ogrsf_frmts/parquet/ogrparquetdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ static GDALDataset *OGRParquetDriverOpen(GDALOpenInfo *poOpenInfo)
std::unique_ptr<parquet::arrow::FileReader> arrow_reader;
auto poMemoryPool = std::shared_ptr<arrow::MemoryPool>(
arrow::MemoryPool::CreateDefault().release());
#if ARROW_VERSION_MAJOR >= 19
PARQUET_ASSIGN_OR_THROW(
arrow_reader,
parquet::arrow::OpenFile(std::move(infile), poMemoryPool.get()));
#else
auto st = parquet::arrow::OpenFile(std::move(infile),
poMemoryPool.get(), &arrow_reader);
if (!st.ok())
Expand All @@ -455,6 +460,7 @@ static GDALDataset *OGRParquetDriverOpen(GDALOpenInfo *poOpenInfo)
"parquet::arrow::OpenFile() failed");
return nullptr;
}
#endif

auto poDS = std::make_unique<OGRParquetDataset>(poMemoryPool);
auto poLayer = std::make_unique<OGRParquetLayer>(
Expand Down

0 comments on commit 438e1bf

Please sign in to comment.