You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently SendableRecordBatchStream imposes Sync constraints.
pub type SendableRecordBatchStream = Pin<Box<dyn RecordBatchStream + Send + Sync>>;
This is unfortunate as not all streams have Sync bounds, furthermore it is unclear why Sync is particularly useful for a stream.
A type is Sync if a reference to it can be shared across multiple threads, as opposed to Send which just requires that it can be sent to another thread. However, you can only poll a stream with a mutable, and therefore exclusive reference. The only thing you can therefore do with a &SendableRecordBatchStream is get the schema which I doubt is being exploited anywhere.
Describe the solution you'd like
Remove the Sync constraint
Describe alternatives you've considered
Keep the sync constraint
Additional context
This constraint currently forces a Mutex in FlightDataStream even though it should be unnecessary - see here
Activity
alamb commentedon Jan 21, 2022
This would be an API breaking change, but seems reasonable to me.
alamb commentedon Jan 21, 2022
This is basically a code refactoring task -- it would require getting friendly with the rust compiler but not need knowledge of DataFusion