This project is super cool already, and I loved looking through the optimizer/analyzer code especially. The sqlite-partial example I think is a fantastic proof of concept! Thank you for your work @backkem!
I had some difficulty getting the project to compile / work with rust analyzer initially. Capitalizing all instances of Cargo.toml fixed that.
We can eliminate the need for tokio::block_on
in the VirtualExecutionPlan
by making SQLExecutor::execute
sync. We can still support async code in those execution plans by using methods like futures::stream::unfold
to return an async stream from a sync function. See for example here: https://github.com/devinjdangelo/DataWeb/blob/main/webengine/src/web_source.rs#L308.
I tried for a while to improve the CXExecutor
to use new_record_batch_iter and then use futures::stream::iter
to return that as an async stream. This fails since the returned iterator is not truly an iterator and further is not thread safe, so in general cannot be used within a stream.
I'll open an issue an think more about how we can support true streaming / batched execution with the connector-x.