Commit e4c20cf
apacheGH-514: [Parquet] Infer schema when projection is null in ParquetReader
This change enables reading Parquet files without an explicit projection schema.
If `options.projection` is not provided, the reader now infers the Iceberg schema
from the Parquet file's Arrow schema using the Arrow C++ API.
* Modified `src/iceberg/parquet/parquet_reader.cc`:
* Removed null check for `projection` in `Open`.
* Implemented `InferIcebergSchema` and `ConvertArrowType` to convert `arrow::Schema` to `iceberg::Schema` directly, avoiding complex C-ABI/nanoarrow dependencies.
* Used inferred schema when `projection` is null.
* Used `::arrow::` prefix to avoid namespace ambiguity.
* Added `src/iceberg/test/parquet_reader_no_projection_test.cc` to verify the fix.
* Updated `src/iceberg/test/CMakeLists.txt` to register the new test file.
Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com>1 parent 2948ec1 commit e4c20cf
0 file changed
0 commit comments