From 1113470551c7b10cc5d9bd6893103342728a6043 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 7 Jul 2021 13:08:32 -0500 Subject: [PATCH] MCOL-4738 AVG gives wrong results with strict_aliasing A f fix that works with strict_aliasing --- utils/rowgroup/rowgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/rowgroup/rowgroup.h b/utils/rowgroup/rowgroup.h index d3277ee6f..e9ee5e87b 100644 --- a/utils/rowgroup/rowgroup.h +++ b/utils/rowgroup/rowgroup.h @@ -1348,7 +1348,7 @@ inline void Row::setLongDoubleField(const long double& val, uint32_t colIndex) uint8_t* p = &data[offsets[colIndex]]; *reinterpret_cast(p) = val; #ifdef MASK_LONGDOUBLE - *(reinterpret_cast(p)+1) &= 0x000000000000FFFFULL; + memset(p+10, 0, 6); #endif }