[
https://issues.apache.org/jira/browse/CALCITE-5365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628629#comment-17628629
]
hqbhoho commented on CALCITE-5365:
----------------------------------
[~julianhyde] thanks,I think Join condition why not spilt to analyze ?
{code:java}
on t1.a1 = t2.b1
and t1.a2 = t2.b2
and t1.a3 = t2.b3
and t1.a4 = t2.b4
and t1.a5 = t2.b5
and t1.a6 = t2.b6
and t1.a7 = t2.b7 {code}
will split to 7 subset [t1.a1 = t2.b1 , t1.a2 = t2.b2 , t1.a3 = t2.b3 , t1.a4 =
t2.b4 , t1.a5 = t2.b5 , t1.a6 = t2.b6 , t1.a7 = t2.b7],I think every subset is
independent. so 3*3*7 RexCall will be produced rather than 3^14.
In addition,add a 'int limit' parameter will lose some predicate info.
> RelMdExpressionLineage#createAllPossibleExpressions will create many RexCall
> lead to OOM
> ------------------------------------------------------------------------------------------
>
> Key: CALCITE-5365
> URL: https://issues.apache.org/jira/browse/CALCITE-5365
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.30.0
> Reporter: hqbhoho
> Priority: Major
>
> Execute query like:
> {code:java}
> select
> *
> from
> (
> select *
> from
> (
> select * from A1
> )
> union all
> (
> select * from A2
> )
> union all
> (
> select * from A3
> )
> ) t1
> left join
> (
> select *
> from
> (
> select * from B1
> )
> union all
> (
> select * from B2
> )
> union all
> (
> select * from B3
> )
> )t2
> on t1.a1 = t2.b1
> and t1.a2 = t2.b2
> and t1.a3 = t2.b3
> and t1.a4 = t2.b4
> and t1.a5 = t2.b5
> and t1.a6 = t2.b6
> and t1.a7 = t2.b7
> left join C1 name
> on t2.b8=name.c1 {code}
> I will get all Predicates via RelMetadataQuery.getAllPredicates(),but will
> occur oom.
> RelMdExpressionLineage#createAllPossibleExpressions will retrun 3^14 RexCall
> when t1 join t2 with 7 condition? (t1.a1 will have 3 replacement)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)