[C++] StructBuilder::AppendNull() Should Use AppendNull() for Children Instead of AppendEmpty()
Open
Component: C++
Type: enhancement
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### StructBuilder::AppendNull() Should Use AppendNull() for Children Instead of AppendEmpty()
1. The current implementation of StructBuilder appends empty to each child vector for each appended null.
2. In some scenarios, I try to extract child[0], and theoretically, the row that was appended as null should also be null. However, this is not the case in practice (because the current implementation uses AppendEmpty for child arrays).
I would like to rewrite the code like this:
Status AppendNull() final {
for (const auto& field : children_) {
ARROW_RETURN_NOT_OK(field->AppendNull());
}
return Append(false);
}
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.