Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bulk_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def prop_to_binary(prop_val, type):
if type == None or type == Type.NUMERIC:
try:
numeric_prop = float(prop_val)
return struct.pack(format_str + "d", Type.NUMERIC, numeric_prop)
if not math.isnan(numeric_prop) and not math.isinf(numeric_prop): # Don't accept non-finite values.
return struct.pack(format_str + "d", Type.NUMERIC, numeric_prop)
except:
pass

Expand Down