Skip to content

Commit

Permalink
revert(postgres): undo hash_numeric_extended use
Browse files Browse the repository at this point in the history
Refs: c459266
  • Loading branch information
deepyaman committed Jun 11, 2024
1 parent 59d3caa commit 23fbbc9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ibis/backends/postgres/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,16 @@ def visit_Cast(self, op, *, arg, to):
def visit_Hash(self, op, *, arg):
arg_dtype = op.arg.dtype

if arg_dtype.is_numeric():
return self.f.hash_numeric_extended(arg, 0)
if arg_dtype.is_int16():
return self.f.hashint2extended(arg, 0)
elif arg_dtype.is_int32():
return self.f.hashint4extended(arg, 0)
elif arg_dtype.is_int64():
return self.f.hashint8extended(arg, 0)
elif arg_dtype.is_float32():
return self.f.hashfloat4extended(arg, 0)
elif arg_dtype.is_float64():
return self.f.hashfloat8extended(arg, 0)
elif arg_dtype.is_string():
return self.f.hashtextextended(arg, 0)
elif arg_dtype.is_macaddr():
Expand Down

0 comments on commit 23fbbc9

Please sign in to comment.