-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hex string literal #6767
Conversation
c29da34
to
6fe9d99
Compare
fb7a983
to
ba495dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ShiKaiWi
Can you add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something about this PR appears to be problematic: ![]() @tustvold is that what you were trying to fix? |
#6770 is now ready for review too (with some basic .slt tests) |
Which issue does this PR close?
Closes #6764 .
Rationale for this change
Datafusion supports the binary data type, but there is no way to insert binary data or query with binary data in a predicate through a sql. And this is caused by missing conversion from
sqlparser::ast::Value::HexStringLiteral
todatafusion_expr::Expr::Literal(ScalarValue::Binary)
.What changes are included in this PR?
Support the conversion from
sqlparser::ast::Value::HexStringLiteral
todatafusion_expr::Expr::Literal(ScalarValue::Binary)
.Are these changes tested?
Add a unit test for hex string literal decoding.
Are there any user-facing changes?
Now, the sql including hex string literal, e.g.
X'FF01'
, can be processed and treated as a binary data by datafusion.