Several Builder::append
methods returning results even though they are infallible
#2071
Labels
Builder::append
methods returning results even though they are infallible
#2071
Which part is this question about
I noticed that a lot of the
append
orappend_null
methods in builders are always returningOk(())
. There are only very few builders that can legitimately return an error, for example dictionaries on overflow or some validation for decimals.Describe your question
I'm wondering whether this is a design decision, to make all builder apis seem more consistent or if it is maybe a leftover from a time when we had fallible allocation logic.
Additional context
Although the compiler should be able to optimize these away, there could still be a performance impact in some cases. It also makes it more difficult to use these builders in an infallible context.
The text was updated successfully, but these errors were encountered: