mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-03 19:29:59 +00:00
Add LIMIT as RESERVED_FOR_TABLE_ALIAS, this closes Issue#67
This commit is contained in:
parent
908082d26f
commit
d263d285e2
3 changed files with 11 additions and 2 deletions
|
|
@ -393,7 +393,7 @@ pub const RESERVED_FOR_TABLE_ALIAS: &[&str] = &[
|
|||
// Reserved as both a table and a column alias:
|
||||
WITH, SELECT, WHERE, GROUP, ORDER, UNION, EXCEPT, INTERSECT,
|
||||
// Reserved only as a table alias in the `FROM`/`JOIN` clauses:
|
||||
ON, JOIN, INNER, CROSS, FULL, LEFT, RIGHT, NATURAL, USING,
|
||||
ON, JOIN, INNER, CROSS, FULL, LEFT, RIGHT, NATURAL, USING, LIMIT,
|
||||
];
|
||||
|
||||
/// Can't be used as a column alias, so that `SELECT <expr> alias`
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,6 @@ impl Parser {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let limit = if self.parse_keyword("LIMIT") {
|
||||
self.parse_limit()?
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue