Skip to content

Commit

Permalink
Fix: Adding UTF encoding for Oracle hash generation (#878)
Browse files Browse the repository at this point in the history
Co-authored-by: Piyush Sarraf <[email protected]>
  • Loading branch information
piyushsarraf and Piyush Sarraf committed Jun 9, 2023
1 parent 65a090a commit 2e24eae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion third_party/ibis/ibis_addon/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def sa_format_hashbytes_mssql(translator, expr):
def sa_format_hashbytes_oracle(translator, expr):
arg, how = expr.op().args
compiled_arg = translator.translate(arg)
hash_func = sa.func.standard_hash(compiled_arg, sa.sql.literal_column("'SHA256'"))
convert = sa.func.convert(compiled_arg, sa.sql.literal_column("'UTF8'"))
hash_func = sa.func.standard_hash(convert, sa.sql.literal_column("'SHA256'"))
return sa.func.lower(hash_func)

def sa_format_hashbytes_mysql(translator, expr):
Expand Down

0 comments on commit 2e24eae

Please sign in to comment.