[ https://issues.apache.org/jira/browse/KYLIN-5307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhong Yanghong updated KYLIN-5307: ---------------------------------- Labels: 5.0.0-alpha (was: ) > [kylin5] Distinguish sum(1) and count(*) > ---------------------------------------- > > Key: KYLIN-5307 > URL: https://issues.apache.org/jira/browse/KYLIN-5307 > Project: Kylin > Issue Type: Improvement > Reporter: Zhong Yanghong > Priority: Major > Labels: 5.0.0-alpha > > In case there's no null values for column LO_ORDERDATE. > The following SQL should return null > {code} > select sum(1) > from LINEORDER > INNER JOIN CUSTOMER > ON LINEORDER.LO_CUSTKEY=CUSTOMER.C_CUSTKEY > INNER JOIN SUPPLIER > ON LINEORDER.LO_SUPPKEY=SUPPLIER.S_SUPPKEY > INNER JOIN PART > ON LINEORDER.LO_PARTKEY=PART.P_PARTKEY > INNER JOIN DATES > ON LINEORDER.LO_ORDERDATE=DATES.D_DATEKEY > where LO_ORDERDATE is null > {code} > while the following SQL should return 0 > {code} > select count(*) > from LINEORDER > INNER JOIN CUSTOMER > ON LINEORDER.LO_CUSTKEY=CUSTOMER.C_CUSTKEY > INNER JOIN SUPPLIER > ON LINEORDER.LO_SUPPKEY=SUPPLIER.S_SUPPKEY > INNER JOIN PART > ON LINEORDER.LO_PARTKEY=PART.P_PARTKEY > INNER JOIN DATES > ON LINEORDER.LO_ORDERDATE=DATES.D_DATEKEY > where LO_ORDERDATE is null > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)