dynamobi/dynamobi — Issue #714: [FRG-158] PushFilterRule can produce untransformed result, throwing Hep for an infinite loop
Author: dynamobi-build
Created: 2011-12-30 03:44:47+00:00
State: closed
Labels: FRG, Statement Processing

[reporter="jvs", created="Mon, 26 Jun 2006 19:55:31 -0500 (GMT-05:00)"]
Here's the rather odd query (based on an internal rewrite I encountered as part of assaying the State of the Subquery):

select emps.name

from emps left outer join (select *, true as x from depts) on true

where x is true;

If you execute this, you have to use kill since these days we intercept Control-C in sqlline, but we're only capable of aborting execution, not optimization. (I should put in an abort check on each Hep transformation applied).

From what I could see from trace and plannerviz, PushFilterRule thinks it has produced something new, but it's an exact match for the original. Hep recognizes the equivalence and discards the new node, but currently isn't capable of using that information to suppress its belief that a transformation has occurred, so it keeps applying the rule over and over.