It looks like the MAX function truncates large longs and loses precision. For example,
select MAX(1639054811930692679) from table
returns
1.63905481193069261E18
. Is this behavior expected?
j
Johan Adami
12/09/2021, 6:41 PM
currently it is. all of these scalar aggregation functions cast to double. i’ll let someone else chime in on what the plan is for the future here, though
t
Tiger Zhao
12/09/2021, 7:06 PM
Would it make sense to keep the original type instead?