Skip to content

Commit

Permalink
ARROW-5923: [C++][Parquet] Reword comment about UBSan and Int96 in wr…
Browse files Browse the repository at this point in the history
…iter.cc

CC @fsaintjacques @pitrou

Author: Micah Kornfield <emkornfield@gmail.com>

Closes #4858 from emkornfield/fix_docs and squashes the following commits:

5294aa7 <Micah Kornfield> fix typo in comment
  • Loading branch information
emkornfield authored and kszucs committed Jul 22, 2019
1 parent 825d359 commit 2356c9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/parquet/arrow/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ inline void ArrowTimestampToImpalaTimestamp(const int64_t time, Int96* impala_ti

int64_t last_day_units = time % UnitPerDay;
auto last_day_nanos = last_day_units * NanosecondsPerUnit;
// Strage might be unaligned, so use mempcy instead of reinterpret_cast
// impala_timestamp will be unaligned every other entry so do memcpy instead
// of assign and reinterpret cast to avoid undefined behavior.
std::memcpy(impala_timestamp, &last_day_nanos, sizeof(int64_t));
}

Expand Down

0 comments on commit 2356c9e

Please sign in to comment.