You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior of binary literal's is a bit weird currently:
importsqlglot.expressionsaseximportsqlglotassgprint(
repr(sg.parse_one("select 0x00000000000007d3", dialect="tsql"))
) # binary literal in SQL Serverprint(
sg.parse_one("select 0x00000000000007d3", dialect="tsql").sql("duckdb")
) # SELECT 2003 --> it's an int in duckdb, a bit unfortunateimportduckdbduckdb.execute(
"select '0x00000000000007d3'::blob"
).fetchall() # correctly gives [(b'0x00000000000007d3',)]ex.convert(
b"\x00\x00\x00\x00\x00\x00\x07\xd3"
) # should be ex.HexString(this="0x00000000000007d3"), I guess# currently throws
Maybe a dedicated BinaryLiteral Type would be good? Not sure how to solve this :)
The text was updated successfully, but these errors were encountered:
The behavior of binary literal's is a bit weird currently:
Maybe a dedicated BinaryLiteral Type would be good? Not sure how to solve this :)
The text was updated successfully, but these errors were encountered: