From a42f007784c055c66f1ff626a4a3990d37730b68 Mon Sep 17 00:00:00 2001 From: Kapil Singh Date: Tue, 13 Feb 2024 12:36:24 +0530 Subject: [PATCH] Remove reinterpret_cast --- velox/dwio/common/TimestampDecoder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/velox/dwio/common/TimestampDecoder.h b/velox/dwio/common/TimestampDecoder.h index ecc66c7e079db..2abf39bbc65a9 100644 --- a/velox/dwio/common/TimestampDecoder.h +++ b/velox/dwio/common/TimestampDecoder.h @@ -65,9 +65,9 @@ class TimestampDecoder : public DirectDecoder { Timestamp timestamp = precision_ == TimestampPrecision::kMillis ? util::fromUTCMillis(units) : util::fromUTCMicros(units); - - toSkip = - visitor.process(*reinterpret_cast(×tamp), atEnd); + int128_t value; + memcpy(&value, ×tamp, sizeof(int128_t)); + toSkip = visitor.process(value, atEnd); } else { toSkip = visitor.process( IntDecoder::template readInt(), atEnd);