Commit ded148c
authored
apacheGH-41667: [C++][Parquet] Refuse writing non-nullable column that contains nulls (apache#44921)
### Rationale for this change
A non-nullable column that contains nulls would result in an invalid Parquet file, so we'd rather raise an error when writing.
This detection is only implemented for leaf columns. Implementing it for non-leaf columns would be more involved, and also doesn't actually seem necessary.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Raising a clear error when trying to write invalid data to Parquet, instead of letting the Parquet writer silently generate an invalid file.
* GitHub Issue: apache#41667
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>1 parent fb8e812 commit ded148c
File tree
3 files changed
+32
-5
lines changed- cpp/src/parquet
- arrow
- java/dataset/src/test/java/org/apache/arrow/dataset
3 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3349 | 3349 | | |
3350 | 3350 | | |
3351 | 3351 | | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
3352 | 3373 | | |
3353 | 3374 | | |
3354 | 3375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1304 | 1308 | | |
1305 | 1309 | | |
1306 | 1310 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | | - | |
102 | | - | |
| 100 | + | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
| |||
239 | 237 | | |
240 | 238 | | |
241 | 239 | | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| |||
0 commit comments