[
https://issues.apache.org/jira/browse/ARROW-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007195#comment-17007195
]
Anthony Abate edited comment on ARROW-6603 at 1/3/20 2:41 PM:
--------------------------------------------------------------
The reason I did this is because as much as I tried to use the existing API -
but I think it can't support null able correctly as many assumptions are baked
into the generic always being non-nullable..
If you see how I implement nullable, I am filling in dummy values in the Value
Buffer for nulls, but correctly setting the value bitmap... this results in a
reader of the arrow file correctly interpreting the NULL.
It still might be possible a builder method called AppendNullable<T?>() into
the existing builder code... but I was able to get the code in the PR to work
fairly quickly once I understood the flatbuffer spec
was (Author: abbot):
The reason I did this is because as much as I tried to use the existing API -
but I think it can't support null able correctly as many assumptions are baked
into the generic always being non-nullable..
If you see how I implement nullablitity, I am filling in dummy values in the
Value Buffer for nulls, but correctly setting the value bitmap... this
results in a reader of the arrow file correctly interpreting the NULL.
It still might be possible a builder method called AppendNullable<T?>() into
the existing builder code... but I was able to get the code in the PR to work
fairly quickly once I understood the flatbuffer spec
> [C#] ArrayBuilder API to support writing nulls
> ----------------------------------------------
>
> Key: ARROW-6603
> URL: https://issues.apache.org/jira/browse/ARROW-6603
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C#
> Reporter: Eric Erhardt
> Assignee: Anthony Abate
> Priority: Major
> Labels: pull-request-available
> Original Estimate: 72h
> Time Spent: 10m
> Remaining Estimate: 71h 50m
>
> There is currently no API in the PrimitiveArrayBuilder class to support
> writing nulls. See this TODO -
> [https://github.com/apache/arrow/blob/1515fe10c039fb6685df2e282e2e888b773caa86/csharp/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs#L101.]
>
> Also see [https://github.com/apache/arrow/issues/5381].
>
> We should add some APIs to support writing nulls.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)