Skip to content

Commit

Permalink
Remove reinterpret_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
mskapilks committed Feb 13, 2024
1 parent df6ed31 commit a42f007
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velox/dwio/common/TimestampDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class TimestampDecoder : public DirectDecoder<false> {
Timestamp timestamp = precision_ == TimestampPrecision::kMillis
? util::fromUTCMillis(units)
: util::fromUTCMicros(units);

toSkip =
visitor.process(*reinterpret_cast<int128_t*>(&timestamp), atEnd);
int128_t value;
memcpy(&value, &timestamp, sizeof(int128_t));
toSkip = visitor.process(value, atEnd);
} else {
toSkip = visitor.process(
IntDecoder<false>::template readInt<int64_t>(), atEnd);
Expand Down

0 comments on commit a42f007

Please sign in to comment.