how to create a dataframe in Rust so it can be used in DataFusion?

29 Views Asked by At

I want to convert existing in-memory data (some columns and a schema) to a dataframe in Rust so it can be processed by DataFusion with its dataframe API. How can we do that?

I see the only constructor has the signature:

pub fn new(session_state: SessionState, plan: LogicalPlan) -> Self {

which requires the SessionState and LogicalPlan. However, the logical plan in my case is not known in advance.

One workaround is to write the data to disk as CSV and then read it back. Certainly it does not work for large data.

1

There are 1 best solutions below

0
On