[
https://issues.apache.org/jira/browse/KYLIN-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhong Yanghong updated KYLIN-4620:
----------------------------------
Description:
In standard sql, there's an edge case for the calculation of expression for a
single row. For example,
{code:java}
${col1} + ${col2}
{code}
if ${col1} or ${col2} is null, the result of this expression should be null.
Therefore, the sum aggregation function does not conform the associative law of
addition. That is
{code:java}
sum(col1) + sum(col2) != sum(col1 + col2)
{code}
To support sum(col1 + col2), we have to predefine the it if null values may
exist for the related columns.
was:
In standard sql, there's an edge case for the calculation of expression for a
single row. For example,
{code:java}
${col1} + ${col2}
{code}
if ${col1} or ${col2} is null, the result of this expression should be null.
Therefore, the sum aggregation function does not conform the associative law of
addition. That is
{code:java}
sum(col1) + sum(col2) != sum(col1 + col2)
{code}
> sum(expression) support should be limited since it's not conform the
> associative law of addition in standard sql
> ----------------------------------------------------------------------------------------------------------------
>
> Key: KYLIN-4620
> URL: https://issues.apache.org/jira/browse/KYLIN-4620
> Project: Kylin
> Issue Type: Improvement
> Reporter: Zhong Yanghong
> Assignee: Zhong Yanghong
> Priority: Major
>
> In standard sql, there's an edge case for the calculation of expression for a
> single row. For example,
> {code:java}
> ${col1} + ${col2}
> {code}
> if ${col1} or ${col2} is null, the result of this expression should be null.
> Therefore, the sum aggregation function does not conform the associative law
> of addition. That is
> {code:java}
> sum(col1) + sum(col2) != sum(col1 + col2)
> {code}
>
> To support sum(col1 + col2), we have to predefine the it if null values may
> exist for the related columns.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)