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

2018-03-18 Thread Billy Liu (JIRA)

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

Billy Liu updated KYLIN-3283:
-
Fix Version/s: v2.4.0

> 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
> Fix For: v2.4.0
>
>
> 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=[5])
> 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=[5])
>   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)


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

2018-03-14 Thread yiming.xu (JIRA)

 [ 
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=[5])
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=[5])
  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=[5])
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=[5])
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=[5])
> 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=[5])
>   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)