Commit e41e28a
fix(calcite): return exact Long sum, not a promoted Double (S2154)
The ?: ternary 'isFloating ? Double.valueOf(d) : Long.valueOf(l)' undergoes
binary numeric promotion — it unboxes both arms and widens the Long to double,
so an integer-column SUM was silently returned as a Double, defeating the exact
long accumulation. Return via if/else (reference, no promotion).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 3f2ae34 commit e41e28a
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
0 commit comments