yiming.xu created KYLIN-3284:
--------------------------------

             Summary: Refactor all OLAPRel computeSelfCost
                 Key: KYLIN-3284
                 URL: https://issues.apache.org/jira/browse/KYLIN-3284
             Project: Kylin
          Issue Type: Improvement
          Components: Query Engine
    Affects Versions: v2.3.0
            Reporter: yiming.xu
            Assignee: yiming.xu


for queries like:
 select lstg_format_name from test_kylin_fact order by case 
 when 1=1 then 
 cal_dt 
 ELSE 
 seller_id 
 end 
the expected logical plan after volcano is:

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]])
however the actual is:
OLAPToEnumerableConverter
  OLAPLimitRel(ctx=[], fetch=[50000])
    OLAPSortRel(sort0=[$1], dir0=[ASC], ctx=[])
      OLAPProjectRel(LSTG_FORMAT_NAME=[$3], EXPR$1=[CASE(=(1, 1), $2, 
CAST($7):DATE)], 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]])





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

Reply via email to