Could you file correspondent JIRAs to both Calcite and Drill with detailed 
repro steps? This sounds a bug to me. I think this is an issue. We are seeing 
some stuck planning when run on latest Calcite with Drill too - not sure if 
this is relevant though. We could exchange details directly.

________________________________
From: Vitalii Diravka <vitalii.dira...@gmail.com>
Sent: Thursday, March 1, 2018 4:10:31 PM
To: dev@calcite.apache.org
Subject: Infinite loop with JoinPushTransitivePredicatesRule

Hi all!

I got the infinite loop while using FilterIntoJoinRule +
JoinPushTransitivePredicatesRule in HEP planner for some correlated
queries, for instance:
*select d.deptno from sales.emp d where d.deptno IN (select e.deptno from
sales.emp e where e.deptno = d.deptno or e.deptno = 4)*

I have a reproduce in Calcite. We always get HepRelVertex for one side of
LogicalJoin relNode or LogicalFilter, therefore the rule is fired every
time and infinitely in result.

I've noticed that the rule works fine after JoinToCorrelateRule. But I
think this is not a decision for using JoinPushTransitivePredicatesRule,
even from the performance perspective.

How I can resolve it or maybe I missed something else?

Kind regards
Vitalii

Reply via email to