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

Change *ExecutionPlan* from trait to enum similar as *LogicalPlan* #3651

Open
yahoNanJing opened this issue Sep 29, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@yahoNanJing
Copy link
Contributor

yahoNanJing commented Sep 29, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

As #2175 mentioned, if we still keep ExecutionPlan as a trait, its related trait object usage will cause many limitations, like not feasible to return Self, inconvenience pattern matching, etc.

Describe the solution you'd like

It's better to change the ExecutionPlan from trait to enum similar as LogicalPlan. For the extension of execution plan, we can introduce a trait for that to provide some extent flexibility, like

enum ExecutionPlan {
  ...
  Extension {
    extension: Arc<dyn ExecutionPlanExtension>,
  }
  ... 
}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

#2175

@alamb
Copy link
Contributor

alamb commented Sep 29, 2022

We might want to send a note to the email list and slack channel to let people know of this change. It is likely to cause significant code churn in all downstream projects.

@alamb
Copy link
Contributor

alamb commented Sep 29, 2022

See also @tustvold 's comments on #2175 (comment)

@andygrove
Copy link
Member

Rather than changing ExectionPlan to be an enum, why don't we add a new enum that can wrap ExecutionPlan? See #3677 for my proposal.

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

3 participants