Rewrite Rule Question

11 views
Skip to first unread message

Eldon Carman

unread,
Mar 26, 2013, 5:16:53 PM3/26/13
to hyrack...@googlegroups.com
How do I make the rewrite rule run a second time if it changes something in the plan?

I have a rewrite rule that runs on a query plan and in the process makes some changes to the plan. The new plan could benefit by the same rule running a second time. Is it possible to reschedule this rule to run again?

Preston

Vinayak Borkar

unread,
Mar 26, 2013, 5:24:47 PM3/26/13
to hyrack...@googlegroups.com
What RuleController are you using with your Rule? The
SequentialFixpointRuleController is meant to run rules until there are
no more changes to the plan.

Sometimes specific Rewrite Rules disable themselves by adding a flag in
the context to not rerun them.

For example, look at lines 156 thru 161 in InlineVariablesRule.

You will have to check what exactly is happening in your case to prevent
the reexecution of rules.


Vinayak
Reply all
Reply to author
Forward
0 new messages