You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@quickstep.apache.org by "Zuyu Zhang (JIRA)" <ji...@apache.org> on 2018/05/07 09:48:00 UTC

[jira] [Closed] (QUICKSTEP-125) Non-determinism in StarSchemaHashJoinOrderOptimization

     [ https://issues.apache.org/jira/browse/QUICKSTEP-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zuyu Zhang closed QUICKSTEP-125.
--------------------------------
    Resolution: Fixed
      Assignee: Zuyu Zhang

> Non-determinism in StarSchemaHashJoinOrderOptimization
> ------------------------------------------------------
>
>                 Key: QUICKSTEP-125
>                 URL: https://issues.apache.org/jira/browse/QUICKSTEP-125
>             Project: Apache Quickstep
>          Issue Type: Bug
>          Components: Query Optimizer
>            Reporter: Zuyu Zhang
>            Assignee: Zuyu Zhang
>            Priority: Major
>
> After when we have the [self-join support|https://issues.apache.org/jira/browse/QUICKSTEP-121],
> {code:java}
> CREATE TABLE t (x int, y int);
> INSERT INTO t SELECT i, i FROM generate_series(1, 99) as gs(i);
> SELECT COUNT(*) FROM t t0, t t1 WHERE t0.y = t1.x;
> {code}
> The build and probe side is non-deterministic between t0 and t1.
> {code:java}
> TopLevelPlan
> +-plan=Selection[has_repartition=false]
> | +-input=Aggregate[has_repartition=false]
> | | +-input=HashJoin[has_repartition=false]
> | | | +-left=TableReference[relation=s,alias=s0]
> | | | | +-AttributeReference[id=0,name=x,relation=s0,type=Int]
> | | | | +-AttributeReference[id=1,name=y,relation=s0,type=Int]
> | | | +-right=TableReference[relation=s,alias=s1]
> | | | | +-AttributeReference[id=2,name=x,relation=s1,type=Int]
> | | | | +-AttributeReference[id=3,name=y,relation=s1,type=Int]
> | | | +-project_expressions=
> | | | | +-AttributeReference[id=0,name=x,relation=s0,type=Int]
> | | | +-left_join_attributes=
> | | | | +-AttributeReference[id=1,name=y,relation=s0,type=Int]
> | | | +-right_join_attributes=
> | | | +-AttributeReference[id=2,name=x,relation=s1,type=Int]
> | | +-grouping_expressions=
> | | | +-[]
> | | +-aggregate_expressions=
> | | +-Alias[id=4,name=,alias=$aggregate0,relation=$aggregate,type=Long]
> | | +-AggregateFunction[function=COUNT]
> | | +-[]
> | +-project_expressions=
> | +-Alias[id=4,name=,alias=count(*),relation=,type=Long]
> | +-AttributeReference[id=4,name=,alias=$aggregate0,relation=$aggregate,
> | type=Long]
> +-output_attributes=
> +-AttributeReference[id=4,name=,alias=count(*),relation=,type=Long]
> I0504 21:19:14.104566 33707 PhysicalGenerator.cpp:211] After applying rule StarSchemaHashJoinOrderOptimization:
> TopLevelPlan
> +-plan=Selection[has_repartition=false]
> | +-input=Aggregate[has_repartition=false]
> | | +-input=HashJoin[has_repartition=false]
> | | | +-left=TableReference[relation=s,alias=s1]
> | | | | +-AttributeReference[id=2,name=x,relation=s1,type=Int]
> | | | | +-AttributeReference[id=3,name=y,relation=s1,type=Int]
> | | | +-right=TableReference[relation=s,alias=s0]
> | | | | +-AttributeReference[id=0,name=x,relation=s0,type=Int]
> | | | | +-AttributeReference[id=1,name=y,relation=s0,type=Int]
> | | | +-project_expressions=
> | | | | +-AttributeReference[id=0,name=x,relation=s0,type=Int]
> | | | +-left_join_attributes=
> | | | | +-AttributeReference[id=2,name=x,relation=s1,type=Int]
> | | | +-right_join_attributes=
> | | | +-AttributeReference[id=1,name=y,relation=s0,type=Int]
> | | +-grouping_expressions=
> | | | +-[]
> | | +-aggregate_expressions=
> | | +-Alias[id=4,name=,alias=$aggregate0,relation=$aggregate,type=Long]
> | | +-AggregateFunction[function=COUNT]
> | | +-[]
> | +-project_expressions=
> | +-Alias[id=4,name=,alias=count(*),relation=,type=Long]
> | +-AttributeReference[id=4,name=,alias=$aggregate0,relation=$aggregate,
> | type=Long]
> +-output_attributes=
> +-AttributeReference[id=4,name=,alias=count(*),relation=,type=Long]
> {code}



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