Repository navigation
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? |
Answered by
alamb
May 23, 2023
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 |
4 replies
Answer selected by
finlaydotb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you need to use a
ListArrayfor 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
StringBuilderto the ListBuilder