Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to create arrow::array from streamReader #1278

Closed
Tudyx opened this issue Feb 6, 2022 · 1 comment
Closed

how to create arrow::array from streamReader #1278

Tudyx opened this issue Feb 6, 2022 · 1 comment
Labels
question Further information is requested

Comments

@Tudyx
Copy link

Tudyx commented Feb 6, 2022

I want to create an arrow::table from a StreamReader object to be able to call the slice method on it. So far i have read my arrow file into my StreamReader but i don't find the good functions to make it into an arrow::table. I don't have any assumption on the type of the data that the stream contains.

let file = File::open("foo.arrow").unwrap();
let mut stream_reader = arrow::ipc::reader::StreamReader::try_new(file).unwrap();

I tried

let table = stream_reader.collect();

and i also tried accessing the BufReader<R> of StreamReader struct directly but without success.
The behavior i seek is similar of the C++ function Status arrow::RecordBatch::ReadAll(std::shared_ptr<Table>* table) , the function that put all content of a stream into one table.
Please, do you have any ideas how i could reach my goal?

@Tudyx Tudyx added the question Further information is requested label Feb 6, 2022
@Tudyx Tudyx closed this as completed Feb 11, 2022
@fnicastri
Copy link

Can you share the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants