How may I construct a value of vec of vecs for a record batch? #6398
-
I can create column of type "UTF8" as follows
Executing a query against this, like so
gives the expected results
Now I have a usecase where the payload should be an array. So something like this
How may I go about this? changing the
When used to create the batch like this
Fails to compile with the error
Any idea on how I may achieve the above? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think you need to use a https://docs.rs/arrow/latest/arrow/array/type.ListArray.html I recommend using a LIstBuilder like this: Here is an example of use: (aka need to pass a |
Beta Was this translation helpful? Give feedback.
I think you need to use a
ListArray
for this usecasehttps://docs.rs/arrow/latest/arrow/array/type.ListArray.html
I recommend using a LIstBuilder like this:
https://docs.rs/arrow/latest/arrow/array/type.ListBuilder.html
Here is an example of use:
https://github.com/influxdata/influxdb_iox/blob/43078576b8b2896b3c148b21e6cc5c208a4bf3ea/flightsql/src/xdbc_type_info/mod.rs#L134C1-L135
(aka need to pass a
StringBuilder
to the ListBuilder