NobiGo commented on code in PR #3733:
URL: https://github.com/apache/calcite/pull/3733#discussion_r1624043542


##########
babel/src/test/resources/sql/redshift.iq:
##########
@@ -523,78 +523,78 @@ select deptno, ratio_to_report(sal) over (partition by 
deptno) from emp;
 !}
 
 # STDDEV_POP
-select empno, stddev_pop(comm) over (order by empno rows unbounded preceding) 
from emp where deptno = 30 order by 1;
+select empno, stddev_pop(CAST(comm AS DECIMAL(12, 4))) over (order by empno 
rows unbounded preceding) from emp where deptno = 30 order by 1;

Review Comment:
   @zabetak Now, In Calcite **REGR_SXX and similar aggregate functions return 
the wrong data type**  The detail please read 
https://issues.apache.org/jira/browse/CALCITE-4924  and I try to use another 
way to make the return type more reasonable by calculate.  @mihaibudiu This 
issue looks same as **CAST a literal to DECIMAL type return wrong result** 
https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-4871. If we 
can't resolv CALCITE-4824, Then we can't handlt the 4871



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to