You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Kelly Nawrocke (JIRA)" <ji...@apache.org> on 2018/02/27 18:05:00 UTC

[jira] [Commented] (CALCITE-1503) Infinite loop occurs during query planning

    [ https://issues.apache.org/jira/browse/CALCITE-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16379050#comment-16379050 ] 

Kelly Nawrocke commented on CALCITE-1503:
-----------------------------------------

I ran into the same problem while testing with the TPC-H queries. Query # 2 would eventually fail with an OOM during query planning. I found that removing one of the JoinPushThroughJoinRule instances (either LEFT or RIGHT) from the VolcanoPlanner's set of rules would prevent the infinite loop from occurring. I tried removing some of the other Join "commuting" rules, but they had no effect. So, quick workaround is to remove one of the JoinPushThroughJoinRule if possible. It was possible in our case, but may not be in others. Just wanted to comment, since there hasn't been much movement on this ticket since 11/2016. The version we are working with is Calcite 1.14.

> Infinite loop occurs during query planning
> ------------------------------------------
>
>                 Key: CALCITE-1503
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1503
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.10.0
>            Reporter: Miguel Oliveira
>            Assignee: Julian Hyde
>            Priority: Major
>         Attachments: output
>
>
> The following query:
> {code}
> SELECT count(*) FROM (
>                 SELECT count(v1.`region_id`) `Count Region`, v6.`fullname` `Customer (Name)`
>                 FROM `foodmart`.`region` v1
>                 JOIN `foodmart`.`store` v3 ON v1.`region_id` = v3.`region_id`
>                 JOIN `foodmart`.`customer` v6 ON v1.`region_id` = v6.`customer_region_id`
>                 JOIN `foodmart`.`sales_fact_1998` v15 ON v3.`store_id` = v15.`store_id` AND v6.`customer_id` = v15.`customer_id`
>                 WHERE v3.`store_name` LIKE '%Grocery%'
>                 GROUP BY v6.`customer_region_id`,v6.`fullname`)  a 
> {code}
> causes an infinite loop during query plan.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)