Skip to content

Conversation

@andygrove
Copy link
Member

@andygrove andygrove commented Feb 4, 2023

Which issue does this PR close?

Part of #5173

Rationale for this change

I would like to be able to use Substrait with physical plans.

What changes are included in this PR?

  • Move existing consumer and producer into substrait::logical_plan namespace.
  • Create new consumer and producer in substrait::physical_plan namespace.
  • Implement very basic support for serializing ParquetExec (really, not enough to be actually useful, but gets the structure in place).

Are these changes tested?

New test added

Are there any user-facing changes?

No

@github-actions github-actions bot added the substrait Changes to the substrait crate label Feb 4, 2023
@andygrove andygrove marked this pull request as ready for review February 5, 2023 15:05
@andygrove
Copy link
Member Author

@nseekhao @jdye64 @waynexia fyi

Copy link
Contributor

@jdye64 jdye64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Andy


pub mod consumer;
pub mod producer;
pub mod logical_plan;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these name changes. Make it much more clear what the library is trying to offer.

expression::MaskExpression, read_rel::ReadType, rel::RelType, Rel,
};

/// Convert Substrait Rel to DataFusion LogicalPlan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, shouldn't this be ExecutionPlan

match &rel.rel_type {
Some(RelType::Read(read)) => {
if read.filter.is_some() || read.best_effort_filter.is_some() {
return Err(DataFusionError::NotImplemented(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just because this is a first pass at getting the framework together or is it truly not possible with DataFusion today?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just a first pass. I plan on following up with smaller PRs to make this usable.

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🚀

I also tried to do physical plan - substrait proto conversion, but gives up and turns to logical plan for simplicity. Glad to see this work starts again.

@andygrove andygrove merged commit de3deb3 into apache:master Feb 7, 2023
@ursabot
Copy link

ursabot commented Feb 7, 2023

Benchmark runs are scheduled for baseline = d5077b5 and contender = de3deb3. de3deb3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants