Skip to content

Commit ed805bf

Browse files
Allow reading Parquet files without explicit projection
Currently, `ParquetReader` requires `ReaderOptions::projection` to be set, otherwise it returns an error. This change allows the reader to infer the schema from the Parquet file metadata if the projection is not provided. - Modified `src/iceberg/parquet/parquet_reader.cc` to fallback to inferring schema from the file if `projection` is null. - Added `src/iceberg/test/parquet_reader_no_projection_test.cc` to verify the fix. - Used `ArrowSchemaGuard` to prevent memory leaks when handling Arrow C schemas. Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com>
1 parent 346f13d commit ed805bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/iceberg/parquet/parquet_reader.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#include "iceberg/arrow/arrow_fs_file_io_internal.h"
3636
#include "iceberg/arrow/arrow_status_internal.h"
37-
#include "iceberg/arrow/metadata_column_util_internal.h"
37+
#include "iceberg/arrow_c_data_guard_internal.h"
3838
#include "iceberg/arrow_c_data_guard_internal.h"
3939
#include "iceberg/parquet/parquet_data_util_internal.h"
4040
#include "iceberg/parquet/parquet_register.h"

0 commit comments

Comments
 (0)