Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.30.0
-
None
-
None
Description
To reproduce(dummy.iq):
!use scott
!set outputformat mysql
SELECT sum(empno) from "scott".emp;
Should return 108172, but return -22900.
This is because RelDataTypeSystemImpl deriveSumType return a wrong datatype. We presume when the parameter is smllInt, the return datatype stay same as the parameter. So the result out of range.
Attachments
Issue Links
- is related to
-
CALCITE-845 Derive SUM’s return type by a customizable policy
- Closed