mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-24 16:04:04 +00:00
Parse byte/bit string literals in MySQL and Postgres (#1532)
This commit is contained in:
parent
73947a5f02
commit
fad2ddd641
3 changed files with 25 additions and 2 deletions
|
@ -5098,3 +5098,14 @@ fn parse_create_type_as_enum() {
|
|||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_bitstring_literal() {
|
||||
let select = pg_and_generic().verified_only_select("SELECT B'111'");
|
||||
assert_eq!(
|
||||
select.projection,
|
||||
vec![SelectItem::UnnamedExpr(Expr::Value(
|
||||
Value::SingleQuotedByteStringLiteral("111".to_string())
|
||||
))]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue