Skip to content

How may I construct a value of vec of vecs for a record batch? #6398

Answered by alamb
finlaydotb asked this question in Q&A
Discussion options

You must be logged in to vote

How may I go about this?

I think you need to use a ListArray for this usecase

https://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

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@finlaydotb
Comment options

@alamb
Comment options

alamb May 24, 2023
Collaborator

@finlaydotb
Comment options

@alamb
Comment options

alamb May 28, 2023
Collaborator

Answer selected by finlaydotb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants