-
Notifications
You must be signed in to change notification settings - Fork 3.9k
ARROW-14725: [C++][Compute] Extract Expression simplification pass registry #11716
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
base: main
Are you sure you want to change the base?
Conversation
|
|
lidavidm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the long delay.
This looks good to me, I left a few questions.
|
|
||
| /// The default registry, which includes built-in simplification passes. | ||
| ARROW_EXPORT | ||
| ExpressionSimplificationPassRegistry* default_expression_simplification_registry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: DefaultExpressionSimplificationRegistry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I see the exec node registry and function registry use different naming schemes (default_exec_factory_registry, GetFunctionRegistry)
| ExpressionSimplificationPassRegistry* default_expression_simplification_registry() { | ||
| class DefaultRegistry : public ExpressionSimplificationPassRegistry { | ||
| public: | ||
| DefaultRegistry() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like FoldConstants should be removed above?
| return expr; | ||
| })); | ||
|
|
||
| if (Identical(simplified, canonicalized)) return expr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return canonicalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also seems we don't need to canonicalize below before calling this.
|
Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days. Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer. |
No description provided.