Skip to content

Instantly share code, notes, and snippets.

@tpboudreau
Created June 15, 2019 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpboudreau/0993beb5c8c1488028e76fb2ca179b7f to your computer and use it in GitHub Desktop.
Save tpboudreau/0993beb5c8c1488028e76fb2ca179b7f to your computer and use it in GitHub Desktop.
Quick hack fix to confirm proximate cause
diff --git a/cpp/src/parquet/types.h b/cpp/src/parquet/types.h
index 779ea6b..f869e9f 100644
--- a/cpp/src/parquet/types.h
+++ b/cpp/src/parquet/types.h
@@ -524,6 +524,9 @@ static inline void Int96SetNanoSeconds(parquet::Int96& i96, int64_t nanoseconds)
}
static inline int64_t Int96GetNanoSeconds(const parquet::Int96& i96) {
+ if (i96.value[2] == 0) {
+ return 0;
+ }
int64_t days_since_epoch = i96.value[2] - kJulianToUnixEpochDays;
int64_t nanoseconds = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment