-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Cargo.toml includes async-trait = '0.1' and src/lib.rs uses #[async_trait] on the TableProvider impl for PrunableStreamingTable.
The async_trait proc-macro crate was a workaround before Rust 1.75 (December 2023), which stabilized async fn in traits (RPITIT). The proc-macro generates less efficient code — it heap-allocates a Box<dyn Future> for each async call — whereas native async fn in traits avoids this overhead.
Steps
- Check whether the DataFusion
TableProvidertrait definition already uses nativeasync fn(it should in recent versions). - If so, remove the
#[async_trait]attribute from thePrunableStreamingTableimpl. - Remove
async-traitfromCargo.toml[dependencies]. - Verify with
cargo testthat nothing breaks.
Benefit
Reduces dependency count and eliminates unnecessary heap allocations in the async execution path.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request