Skip to content

Commit 8b0b8ac

Browse files
committed
Fix(sqlite): allow 2-arg version of UNHEX closes #4648
1 parent 8a808a6 commit 8b0b8ac

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sqlglot/expressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6679,7 +6679,7 @@ class TsOrDiToDi(Func):
66796679

66806680

66816681
class Unhex(Func):
6682-
pass
6682+
arg_types = {"this": True, "expression": False}
66836683

66846684

66856685
class Unicode(Func):

tests/dialects/test_sqlite.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class TestSQLite(Validator):
77
dialect = "sqlite"
88

99
def test_sqlite(self):
10+
self.validate_identity("UNHEX(a, b)")
1011
self.validate_identity("SELECT DATE()")
1112
self.validate_identity("SELECT DATE('now', 'start of month', '+1 month', '-1 day')")
1213
self.validate_identity("SELECT DATETIME(1092941466, 'unixepoch')")

0 commit comments

Comments
 (0)