Skip to content
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

Merged
merged 15 commits into from
Jul 28, 2021

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jul 27, 2021

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.

@andygrove andygrove changed the title WIP: Tighter integration between DataFusion and Ballista Support DataFrame.collect for Ballista DataFrames Jul 27, 2021
@andygrove andygrove self-assigned this Jul 27, 2021
@alamb
Copy link
Contributor

alamb commented Jul 27, 2021

I will plan to review this tomorrow

Copy link
Contributor

@alamb alamb left a 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?;
Copy link
Contributor

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 {
Copy link
Contributor

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 👍

@andygrove
Copy link
Member Author

This is a really nice structure 👍

Thanks. It was nice that I didn't have to make any changes to DataFusion to make this work.

@andygrove andygrove merged commit ea1d767 into apache:master Jul 28, 2021
@andygrove andygrove deleted the ballista-collect branch July 28, 2021 14:24
@houqp houqp added the enhancement New feature or request label Jul 29, 2021
@houqp houqp added the api change Changes the API exposed to users of the crate label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Changes the API exposed to users of the crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support DataFrame.collect for Ballista DataFrames
3 participants