-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Refactors and agg improvements for new local execution model #2497
Conversation
pub trait Source: Send + Sync { | ||
async fn get_data( | ||
&self, | ||
) -> Box<dyn Stream<Item = DaftResult<Arc<MicroPartition>>> + Send + Unpin>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use boxstream as we talked about
@@ -32,6 +35,6 @@ impl Source for ScanTaskSource { | |||
// TODO: Implement dynamic splitting / merging of MicroPartition from scan task | |||
Ok(Arc::new(out)) | |||
})); | |||
Box::pin(stream) | |||
Box::new(stream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream.boxed() instead
Ok(Arc::new(out)) | ||
} | ||
|
||
fn name(&self) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to block here but this trait should return a &'static str
so we don't need to perform a heap allocation each time we ask for the name
} | ||
} | ||
|
||
impl IntermediateOperator for AggregateOperator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
future work: this should instead just be a blocking sink
fn get_data(&self) -> Pin<Box<dyn Stream<Item = DaftResult<Arc<MicroPartition>>> + Send>> { | ||
async fn get_data( | ||
&self, | ||
) -> Box<dyn Stream<Item = DaftResult<Arc<MicroPartition>>> + Send + Unpin> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
favor typedef-ed BoxStream<DaftResult<Arc<MicroPartition>>>
|
||
Box::pin(ReceiverStream::new(rx)) | ||
Box::new(ReceiverStream::new(rx)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.boxed()
Makes source trait async
Connect to new local physical plan
Add incremental aggregations