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

It would be nice to have a way to generate unique IDs in optimizer rules #2886

Closed
avantgardnerio opened this issue Jul 12, 2022 · 0 comments · Fixed by #2887
Closed

It would be nice to have a way to generate unique IDs in optimizer rules #2886

avantgardnerio opened this issue Jul 12, 2022 · 0 comments · Fixed by #2887
Labels
enhancement New feature or request

Comments

@avantgardnerio
Copy link
Contributor

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

When writing optimizer rules, it is sometime necessary to generate things like aliases which must have unique names. Currently, there is no mutable context in which this can be done, so the only possibility is to use something like a UUID, which is both not easy to read and not deterministic for testing.

Describe the solution you'd like

For the reasons described above, it would be nice to make the OptimizerConfig mutable, so we can add a next_id() function to generate unique identifiers.

Describe alternatives you've considered

One could argue that this is an abuse of something called "config", and break out a separate context (which could possible wrap the existing immutable config).

Additional context

See PR #2885

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

Successfully merging a pull request may close this issue.

1 participant