yevgenypats commented on code in PR #34454:
URL: https://github.com/apache/arrow/pull/34454#discussion_r1129932087
##########
go/arrow/datatype_extension.go:
##########
@@ -122,7 +124,9 @@ type ExtensionType interface {
// If the storage type is incorrect or something else is invalid with
the data this should
// return nil and an appropriate error.
Deserialize(storageType DataType, data string) (ExtensionType, error)
-
+ // this should return array.Builder interface but we cannot import due
to cycle import, so we use
+ // interface{} instead. At least for
+ NewBuilder(mem memory.Allocator, dt ExtensionType) interface{}
Review Comment:
re using `Builder` in the signature I think it might be more complex than it
seems (I tried it initially). For example `newData *Data` function which means
we need also to take `Data` to `arrow` pacakge. In that case it might be even
easier to move `datatype_extension.go` to `array` because we can import from
`array` the `arrow` package but not the otherway around (Also, there are even
more complications because the interface has private functions which would
cause compilation error if we move it to a different package). Can't think of
a much easier way without a big refactor which I think better to avoid atm and
just do the runtime check. WDYT ?
--
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]