Skip to content

Commit

Permalink
invariant fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jul 28, 2023
1 parent edc489c commit 4a70578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c/driver/postgresql/postgres_copy_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class PostgresCopyIntervalFieldReader : public PostgresCopyFieldReader {
// postgres stores time as usec, arrow stores as ns
const int64_t time_usec = ReadUnsafe<int64_t>(data);

if ((time_usec > INT64_MAX / 1000) | (time_usec < INT64_MIN / 1000)) {
if ((time_usec > INT64_MAX / 1000) || (time_usec < INT64_MIN / 1000)) {
ArrowErrorSet(error, "[libpq] Interval with time value %" PRId64
" usec would overflow when converting to nanoseconds");
return EINVAL;
Expand Down

0 comments on commit 4a70578

Please sign in to comment.