Gladson Vas created KYLIN-3967:
----------------------------------
Summary: sum along with case expression does not work in query
Key: KYLIN-3967
URL: https://issues.apache.org/jira/browse/KYLIN-3967
Project: Kylin
Issue Type: Bug
Components: Query Engine
Reporter: Gladson Vas
When i try to run a query with a sum case expression combination,
eg: select sum(case when col1<0 then 0 else col1 end ) from table
i get the following error:
No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc [expression=SUM,
parameter=CASE(<($8, 0), 0, $8), returnType=null]], rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT,
table],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, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106]) while executing
SQL: "select sum (case when col1 <0 then 0 else col1 end ) from table LIMIT 50000"
is there any way to support this sum case expression in the query engine?
Also I get the same error when the sum operation is done on a column derived from a case expression
in a subquery.
eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as col1 from
table) a
Thanks,
Gladson
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
|