iffyio commented on code in PR #1614:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1614#discussion_r1894627136


##########
src/parser/mod.rs:
##########
@@ -9604,7 +9604,13 @@ impl<'a> Parser<'a> {
             top = Some(self.parse_top()?);
         }
 
-        let projection = self.parse_projection()?;
+        let projection = if dialect_of!(self is PostgreSqlDialect | 
GenericDialect)
+            && self.peek_keyword(Keyword::FROM)
+        {
+            vec![]
+        } else {
+            self.parse_projection()?
+        };

Review Comment:
   we can probably skip these changes in this PR given it's now in 
https://github.com/apache/datafusion-sqlparser-rs/pull/1613? 



##########
src/ast/mod.rs:
##########
@@ -3336,6 +3336,27 @@ pub enum Statement {
         is_eq: bool,
     },
     /// ```sql
+    /// LOCK [ TABLE ] [ ONLY ] name [ * ] [, ...] [ IN lockmode MODE ] [ 
NOWAIT ]
+    /// ```
+    /// Where *lockmode* is one of:
+    ///
+    /// ACCESS SHARE | ROW SHARE | ROW EXCLUSIVE | SHARE UPDATE EXCLUSIVE
+    /// | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE | ACCESS EXCLUSIVE
+    ///
+    /// Note: this is a Postgres-specific statement. See 
<https://www.postgresql.org/docs/current/sql-lock.html>
+    LockTablesPG {

Review Comment:
   Could we take a look at merging this into the existing 
`Statement::LockTables` variant? I think that would be the desirable path 
forward in order to avoid duplicating the statement type



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to