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

Enhance Rel to make rewrites easier #26

Closed
jacques-n opened this issue Jul 18, 2024 · 1 comment
Closed

Enhance Rel to make rewrites easier #26

jacques-n opened this issue Jul 18, 2024 · 1 comment

Comments

@jacques-n
Copy link
Contributor

Let's add the following functions to plan.Rel along with impls in the associated impls.

// Copy creates a copy of this relation with new inputs
Copy(inputs ...Rel) (Rel, error)

// GetInputs returns a list of zero or more inputs for this relation
GetInputs() []Rel

// CopyWithExpressionRewrite rewrites all expression trees in this Rel. Returns nil 
// if no changes were made, otherwise a newly created rel that includes the given expressions
CopyWithExpressionRewrite(inputs ...Rel, func(expr.Expression) (expr.Expression, error)) (Rel, error)
@jacques-n
Copy link
Contributor Author

Resolved by #29

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

No branches or pull requests

1 participant