| 796 | } |
| 797 | |
| 798 | void MaybeAddNullable(const Array& array) { |
| 799 | if (!nullable_in_parent_) { |
| 800 | return; |
| 801 | } |
| 802 | info_.max_def_level++; |
| 803 | // We don't use null_count() because if the null_count isn't known |
| 804 | // and the array does in fact contain nulls, we will end up |
| 805 | // traversing the null bitmap twice (once here and once when calculating |
| 806 | // rep/def levels). Because this isn't terminal this might not be |
| 807 | // the right decision for structs that share the same nullable |
| 808 | // parents. |
| 809 | if (LazyNoNulls(array)) { |
| 810 | // Don't add anything because there won't be any point checking |
| 811 | // null values for the array. There will always be at least |
| 812 | // one more array to handle nullability. |
| 813 | return; |
| 814 | } |
| 815 | if (LazyNullCount(array) == array.length()) { |
| 816 | info_.path.emplace_back(AllNullsTerminalNode(info_.max_def_level - 1)); |
| 817 | return; |
| 818 | } |
| 819 | info_.path.emplace_back( |
| 820 | NullableNode(array.null_bitmap_data(), array.offset(), |
| 821 | /* def_level_if_null = */ info_.max_def_level - 1)); |
| 822 | } |
| 823 | |
| 824 | Status VisitInline(const Array& array); |
| 825 |
nothing calls this directly
no test coverage detected