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

Native PhysicalPlanner extension points #1077

Open
mwiewior opened this issue Nov 12, 2024 · 1 comment
Open

Native PhysicalPlanner extension points #1077

mwiewior opened this issue Nov 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mwiewior
Copy link

mwiewior commented Nov 12, 2024

What is the problem the feature request solves?

Extending Comet with custom operators requires three-step procedure:

  1. Creating a custom SparkSessionExtensions class responsible for modification of SparkPlan object. This is not trivial especially if you would like to apply custom rules on top plan that has been already processed by the rules from CometSparkSessionExtensions it requires rerun of native block merging, re-serialization of native operators for a given block, etc - not easy but doable.
  2. Extending Prototbuf messages - currently making a copy of Comet proto files and adding a new operators - again not ideal but easy to do.
  3. The problem is with extending PhysicalPlanner and create_plan function that does the mapping of Opstruct to native implementation of operators.

Describe the potential solution

There is a long discussion (in many threads in the Internet) about the way plugin mechanism should be implemented in Rust applications given the problem of stability of Application Binary Interface (ABI), memory safety aspects, etc.
See this, that and that .
Seems like all approaches have their pros and cons and I'm too inexperienced in Rust that I could judge which is the best in Comet case. I'm happy to help to implement it once we agree upon the strategy.

Additional context

@mwiewior mwiewior added the enhancement New feature or request label Nov 12, 2024
@andygrove
Copy link
Member

Thanks for filing this @mwiewior. Having a plugin mechanism would allow us to support Rust UDFs as well, which would be a compelling feature for Comet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants