golang-samples icon indicating copy to clipboard operation
golang-samples copied to clipboard

bigquery: demonstrate use of arrow serialization with bigquerystorage reading

Open shollyman opened this issue 4 years ago • 2 comments

Copied from https://github.com/googleapis/google-cloud-go/issues/3682, filed by https://github.com/mrgleeco.

Request:

A golang analog to the Java implementation as described at https://cloud.google.com/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1

What we need:

Example showing how to use https://pkg.go.dev/github.com/apache/arrow/go/arrow and relevant subpackages for reading individual row batches, and at least some schema handling code.

shollyman avatar Feb 09 '21 16:02 shollyman

https://arrow.apache.org/docs/status.html#implementation-status tracks the deltas by language. Looks like we're still missing some necessary types for go (null and decima256), and it looks like there's still a requirement that the flatbuffer to be decoded has the schema embedded (the storage API uses an external schema message). Need to either work around this via constructing/merging schema into a flatbuffer or go fix arrow upstream.

shollyman avatar May 26 '21 17:05 shollyman

started contributions in apache arrow

shollyman avatar Jun 30 '21 20:06 shollyman

@shollyman looks like implementation for Decimal256 was recently added to Go ( see https://github.com/apache/arrow/commit/6d1bc624454b8a83e5c90410b51c2718059c394b ) and the Null data type also appears on the implementation status dashboard. I'll take a look later on the schema part that you mentioned here.

alvarowolfx avatar Sep 07 '22 20:09 alvarowolfx

Resolved by https://github.com/GoogleCloudPlatform/golang-samples/pull/2710

alvarowolfx avatar Sep 09 '22 14:09 alvarowolfx