Remove Sync from SendableRecordBatchStream #1614
Labels
api change
Changes the API exposed to users of the crate
datafusion
Changes in the datafusion crate
enhancement
New feature or request
good first issue
Good for newcomers
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently
SendableRecordBatchStream
imposesSync
constraints.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 toSend
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
inFlightDataStream
even though it should be unnecessary - see hereThe text was updated successfully, but these errors were encountered: