Leading zeros are stripped from hex
vegarsti opened this issue · 3 comments
vegarsti commented
E.g. the burn address, 0x0000000000000000000000000000000000000000, becomes 0x0.
vegarsti commented
These are lost at parse time
>>> import sqlglot
>>> sqlglot.__version__
'11.7.1'
>>> sqlglot.parse_one("select X'0010'", read="trino")
(SELECT expressions:
(HEXSTRING this: 16)
>>> sqlglot.parse_one("select X'10'", read="trino")
(SELECT expressions:
(HEXSTRING this: 16))
>>> sqlglot.transpile("select X'0010'", read="trino")[0]
"SELECT X'10'"