From a37ba089ecc13bb6539e18e70dafd67173c487dc Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Mon, 17 Jun 2019 10:55:12 +0300 Subject: [PATCH] Add a comment about RESERVED_FOR_TABLE_ALIAS to parse_table_and_joins --- src/sqlparser.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sqlparser.rs b/src/sqlparser.rs index 3e11f2e9..6924a932 100644 --- a/src/sqlparser.rs +++ b/src/sqlparser.rs @@ -1611,6 +1611,10 @@ impl Parser { pub fn parse_table_and_joins(&mut self) -> Result { let relation = self.parse_table_factor()?; + + // Note that for keywords to be properly handled here, they need to be + // added to `RESERVED_FOR_TABLE_ALIAS`, otherwise they may be parsed as + // a table alias. let mut joins = vec![]; loop { let join = if self.parse_keyword("CROSS") {