mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Fix STRAIGHT_JOIN
constraint when table alias is absent (#1812)
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
parent
3ad13af563
commit
81d8909e00
2 changed files with 9 additions and 1 deletions
|
@ -27,7 +27,12 @@ use crate::{
|
|||
|
||||
use super::keywords;
|
||||
|
||||
const RESERVED_FOR_TABLE_ALIAS_MYSQL: &[Keyword] = &[Keyword::USE, Keyword::IGNORE, Keyword::FORCE];
|
||||
const RESERVED_FOR_TABLE_ALIAS_MYSQL: &[Keyword] = &[
|
||||
Keyword::USE,
|
||||
Keyword::IGNORE,
|
||||
Keyword::FORCE,
|
||||
Keyword::STRAIGHT_JOIN,
|
||||
];
|
||||
|
||||
/// A [`Dialect`] for [MySQL](https://www.mysql.com/)
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -3715,4 +3715,7 @@ fn parse_straight_join() {
|
|||
mysql().verified_stmt(
|
||||
"SELECT a.*, b.* FROM table_a AS a STRAIGHT_JOIN table_b AS b ON a.b_id = b.id",
|
||||
);
|
||||
// Without table alias
|
||||
mysql()
|
||||
.verified_stmt("SELECT a.*, b.* FROM table_a STRAIGHT_JOIN table_b AS b ON a.b_id = b.id");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue