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


##########
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)

Review Comment:
   could we use a dialect method for the feature flag? so that this becomes 
e.g. `if self.dialect.supports_empty_projections() && 
self.peek_keyword(Keyword::FROM)`



##########
tests/sqlparser_postgres.rs:
##########
@@ -5195,3 +5195,8 @@ fn parse_bitstring_literal() {
         ))]
     );
 }
+
+#[test]
+fn parse_select_without_projection() {

Review Comment:
   if we use a dialect method suggesed above we'd likely want to move this to 
common and be able to write the  test using 
[all_dialects_where()](https://github.com/apache/datafusion-sqlparser-rs/blob/bcdc790b0135dc64ec4d40eaa837316530a5f5f3/tests/sqlparser_common.rs#L4981)



-- 
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