The issue was an incorrect conversion of (various) bytes scalars to sqlparser::Value as SingleQuotedByteStringLiteral.
All bytes scalars are stored as lower-hex encoded strings. Thus, changing the conversion to sql::Value::SingleQuotedString(hex::encode(self)) fixes the issue.
Testing steps
The same testing steps as outlined in #1480.
This PR also adds a couple of test cases.
Changelog
Fix ToSQLValue encoding of bytes [u8] scalar types
Description
Fixes #1480.
The issue was an incorrect conversion of (various)
bytes
scalars tosqlparser::Value
asSingleQuotedByteStringLiteral
.All
bytes
scalars are stored as lower-hex encoded strings. Thus, changing the conversion tosql::Value::SingleQuotedString(hex::encode(self))
fixes the issue.Testing steps
The same testing steps as outlined in #1480.
This PR also adds a couple of test cases.
Changelog
ToSQLValue
encoding of bytes[u8]
scalar types