You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "yiming.xu (JIRA)" <ji...@apache.org> on 2018/03/14 15:23:00 UTC

[jira] [Updated] (KYLIN-3283) Support values RelNode

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

yiming.xu updated KYLIN-3283:
-----------------------------
    Description: 
for queries like:
select leaf_categ_id, sum(price) as sum_price from test_kylin_fact  group by leaf_categ_id
union all
select 1 as leaf_categ_id2, 2 as sum_price2 
the expected logical plan after volcano is:

{code:java}
OLAPToEnumerableConverter
  OLAPLimitRel(ctx=[], fetch=[50000])
    OLAPUnionRel(all=[true], ctx=[], all=[true])
      OLAPAggregateRel(group=[{0}], SUM_PRICE=[SUM($1)], ctx=[])
        OLAPProjectRel(LEAF_CATEG_ID=[$4], PRICE=[$8], ctx=[])
          OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
      OLAPProjectRel(LEAF_CATEG_ID2=[1], SUM_PRICE2=[2], ctx=[])
        OLAPValuesRel(type=[RecordType(INTEGER ZERO)], tuples=[[{ 0 }]])
{code}

however the actual is:
{code:java}
EnumerableLimit(fetch=[50000])
  EnumerableUnion(all=[true])
    OLAPToEnumerableConverter
      OLAPAggregateRel(group=[{0}], SUM_PRICE=[SUM($1)], ctx=[])
        OLAPProjectRel(LEAF_CATEG_ID=[$4], PRICE=[$8], ctx=[])
          OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
    EnumerableCalc(expr#0=[{inputs}], expr#1=[1], expr#2=[2], LEAF_CATEG_ID2=[$t1], SUM_PRICE2=[$t2])
      EnumerableValues(type=[RecordType(INTEGER ZERO)], tuples=[[{ 0 }]])
{code}


  was:
for queries like:
select leaf_categ_id, sum(price) as sum_price from test_kylin_fact  group by leaf_categ_id
union all
select 1 as leaf_categ_id2, 2 as sum_price2 
the expected logical plan after volcano is:

{code:java}
OLAPToEnumerableConverter
  OLAPLimitRel(ctx=[], fetch=[50000])
    OLAPAggregateRel(group=[{}], EXPR$0=[SUM($0)], ctx=[])
      OLAPProjectRel(count=[$1], ctx=[])
        OLAPSortRel(sort0=[$1], dir0=[DESC], ctx=[])
          OLAPAggregateRel(group=[{0}], count=[COUNT()], ctx=[])
            OLAPProjectRel(LSTG_FORMAT_NAME=[$3], ctx=[])
              OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
{code}

however the actual is:
{code:java}
OLAPToEnumerableConverter
  OLAPLimitRel(ctx=[], fetch=[50000])
    OLAPUnionRel(all=[true], ctx=[], all=[true])
      OLAPAggregateRel(group=[{0}], SUM_PRICE=[SUM($1)], ctx=[])
        OLAPProjectRel(LEAF_CATEG_ID=[$4], PRICE=[$8], ctx=[])
          OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
      OLAPProjectRel(LEAF_CATEG_ID2=[1], SUM_PRICE2=[2], ctx=[])
        OLAPValuesRel(type=[RecordType(INTEGER ZERO)], tuples=[[{ 0 }]])
{code}



> Support values RelNode
> ----------------------
>
>                 Key: KYLIN-3283
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3283
>             Project: Kylin
>          Issue Type: New Feature
>          Components: Query Engine
>    Affects Versions: v2.3.0
>            Reporter: yiming.xu
>            Assignee: yiming.xu
>            Priority: Major
>
> for queries like:
> select leaf_categ_id, sum(price) as sum_price from test_kylin_fact  group by leaf_categ_id
> union all
> select 1 as leaf_categ_id2, 2 as sum_price2 
> the expected logical plan after volcano is:
> {code:java}
> OLAPToEnumerableConverter
>   OLAPLimitRel(ctx=[], fetch=[50000])
>     OLAPUnionRel(all=[true], ctx=[], all=[true])
>       OLAPAggregateRel(group=[{0}], SUM_PRICE=[SUM($1)], ctx=[])
>         OLAPProjectRel(LEAF_CATEG_ID=[$4], PRICE=[$8], ctx=[])
>           OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
>       OLAPProjectRel(LEAF_CATEG_ID2=[1], SUM_PRICE2=[2], ctx=[])
>         OLAPValuesRel(type=[RecordType(INTEGER ZERO)], tuples=[[{ 0 }]])
> {code}
> however the actual is:
> {code:java}
> EnumerableLimit(fetch=[50000])
>   EnumerableUnion(all=[true])
>     OLAPToEnumerableConverter
>       OLAPAggregateRel(group=[{0}], SUM_PRICE=[SUM($1)], ctx=[])
>         OLAPProjectRel(LEAF_CATEG_ID=[$4], PRICE=[$8], ctx=[])
>           OLAPTableScan(table=[[DEFAULT, TEST_KYLIN_FACT]], ctx=[], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]])
>     EnumerableCalc(expr#0=[{inputs}], expr#1=[1], expr#2=[2], LEAF_CATEG_ID2=[$t1], SUM_PRICE2=[$t2])
>       EnumerableValues(type=[RecordType(INTEGER ZERO)], tuples=[[{ 0 }]])
> {code}



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