joellubi commented on code in PR #43234:
URL: https://github.com/apache/arrow/pull/43234#discussion_r1676357820
##########
go/arrow/array/builder.go:
##########
@@ -349,12 +349,10 @@ func NewBuilder(mem memory.Allocator, dtype
arrow.DataType) Builder {
typ := dtype.(*arrow.LargeListViewType)
return NewLargeListViewBuilderWithField(mem, typ.ElemField())
case arrow.EXTENSION:
- typ := dtype.(arrow.ExtensionType)
- bldr := NewExtensionBuilder(mem, typ)
- if custom, ok := typ.(ExtensionBuilderWrapper); ok {
- return custom.NewBuilder(bldr)
+ if custom, ok := dtype.(CustomExtensionBuilder); ok {
+ return custom.NewBuilder(mem)
}
- return bldr
+ return NewExtensionBuilder(mem, dtype.(arrow.ExtensionType))
Review Comment:
Yes, good idea. I just added some additional tests comparing the behavior of
an extension type with/without a custom builder to really make the distinction
clear.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]