[Bug] Nullability validation incorrectly checks children masked by null parents
- Dominant language
- C++
- Stars
- 65
- Forks
- 25
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 80
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon-cpp/issues) and found nothing similar.
### Paimon-cpp version
master
### Minimal reproduce step
`ArrowUtils::CheckNullabilityMatch` recursively checks complete Arrow child arrays.
For nested Arrow types, a null parent may still have physical child values. These
children are logically hidden and should not participate in nullability validation.
However, if a hidden child is null and its field is non-nullable, the current
implementation rejects the batch.
This affects nested STRUCT, LIST, MAP, and VECTOR fields and is inconsistent with
Java's logical row semantics.
### What doesn't meet your expectations?
Expected behavior:
- Ignore child values masked by a null parent.
- Reject null children when the parent is valid and the child is logically visible.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Contributor guide
Research direction
Start by locating ArrowUtils::CheckNullabilityMatch and the tests covering nested STRUCT, LIST, MAP, and VECTOR arrays. Verify cases where null parents contain physically null children, and cases where valid parents expose null children; done means masked children are ignored while visible non-nullable children are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100