Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Feat: heuristic rule might result in already generated expr making expr replacement tricky #97

Open
AveryQi115 opened this issue Mar 11, 2024 · 0 comments

Comments

@AveryQi115
Copy link
Contributor

Context

https://github.com/cmu-db/optd/pull/88

Current Design

When the generated expr by heuristic rule already exist in another group, we merge two groups and mark the old expr as a dead end (mark all rules have been fired for it.) It might be costly.

And here are several alternatives:

  1. remove the old expr, but keep the group so that its parent can still find it. (might lead to an empty group without expr, might cause future problems)
  2. add a flag to mark the expr is a dead end

Test Guidance

It happens in two scenarios:

  1. the generated expr by heuristic rule already exist in another group
  2. the generated expr is a placeholder type containg a new group id

With small number of rules, the first scenario is quite rare. The feat might be improved and tested with more rules in the future.

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

No branches or pull requests

1 participant