Commit 373fbaa
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.
* Modified `src/iceberg/parquet/parquet_reader.cc` to remove the null check for `projection` and add schema inference logic using `FromArrowSchema`.
* Added `src/iceberg/test/parquet_reader_no_projection_test.cc` to verify the fix.
* Updated `src/iceberg/CMakeLists.txt` to include `arrow_c_data_guard_internal.cc` and `schema_internal.cc` in the bundle target to resolve linker errors.
Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com>1 parent 2aeb1ae commit 373fbaa
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | | - | |
| 189 | + | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | | - | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
0 commit comments