-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support DataFrame.collect for Ballista DataFrames #785
Conversation
Co-authored-by: Andrew Lamb <[email protected]>
I will plan to review this tomorrow |
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.
This is a really nice structure 👍
let batch = batch?; | ||
results.push(batch); | ||
} | ||
let results = df.collect().await?; |
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.
That is certainly nicer 👍
} | ||
|
||
#[async_trait] | ||
impl ExecutionPlan for DistributedQueryExec { |
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.
This is a cool pattern 👍
Thanks. It was nice that I didn't have to make any changes to DataFusion to make this work. |
Which issue does this PR close?
Closes #787.
Rationale for this change
A DataFrame from a BallistaContext should work just like a DataFrame from a DataFusion ExecutionContext. The user should be able to directly call execution methods such as
collect
.What changes are included in this PR?
DataFrames created by Ballista have a custom query planner that can create Ballista physical plans.
Are there any user-facing changes?
Yes - the user no longer needs to call
BallistaContext::collect
.