Repository navigation
Commit 83bacb7
committed
Fix IsNull/NotNull binding ignoring ancestor nullability for required nested fields
BoundIsNull/BoundNotNull folded to AlwaysFalse()/AlwaysTrue() at bind time
using only a field's own required flag. A required leaf field can still be
absent from a row if an optional ancestor struct containing it is null, so
plan_files() was silently dropping matching files once IsNull/NotNull hit a
required field under an optional parent.
Add Schema.is_field_required_in_path to walk the existing ancestor index and
check the full path, and move the fold from BoundIsNull/BoundNotNull.__new__
into IsNull.bind()/NotNull.bind(), where the schema is already in scope.
BoundReference and all other public signatures are unchanged.
This mirrors Java's fix for the same bug (apache/iceberg#14270), which
similarly reverted an earlier attempt to carry ancestor-nullability on the
Accessor/BoundTerm itself (apache/iceberg#13804) in favor of a schema-level
ancestor walk done only at bind time.1 parent 068aae5 commit 83bacb7
4 files changed
Lines changed: 94 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | 571 | | |
577 | 572 | | |
578 | 573 | | |
| |||
583 | 578 | | |
584 | 579 | | |
585 | 580 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | 581 | | |
592 | 582 | | |
593 | 583 | | |
| |||
607 | 597 | | |
608 | 598 | | |
609 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
610 | 607 | | |
611 | 608 | | |
612 | 609 | | |
| |||
622 | 619 | | |
623 | 620 | | |
624 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
285 | 305 | | |
286 | 306 | | |
287 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
821 | 831 | | |
822 | 832 | | |
823 | 833 | | |
| |||
1292 | 1302 | | |
1293 | 1303 | | |
1294 | 1304 | | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1295 | 1330 | | |
1296 | 1331 | | |
1297 | 1332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
448 | 473 | | |
449 | 474 | | |
450 | 475 | | |
| |||
0 commit comments