Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion sqlglot-integration-tests
3 changes: 3 additions & 0 deletions sqlglot/generators/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4205,6 +4205,9 @@ def hexstring_sql(
# UNHEX('FF') correctly produces blob \xFF in DuckDB
return super().hexstring_sql(expression, binary_function_repr="UNHEX")

def hexdecodestring_sql(self, expression: exp.HexDecodeString) -> str:
return self.sql(exp.Decode(this=exp.Unhex(this=expression.this)))

def datetrunc_sql(self, expression: exp.DateTrunc) -> str:
unit = expression.args.get("unit")
date = expression.this
Expand Down
1 change: 1 addition & 0 deletions sqlglot/parsers/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ class SnowflakeParser(parser.Parser):
this=seq_get(args, 0), expression=seq_get(args, 1), negative_length_returns_empty=True
),
"HEX_DECODE_BINARY": exp.Unhex.from_arg_list,
"HEX_DECODE_STRING": exp.HexDecodeString.from_arg_list,
"IFF": exp.If.from_arg_list,
"JAROWINKLER_SIMILARITY": lambda args: exp.JarowinklerSimilarity(
this=seq_get(args, 0),
Expand Down
Loading