benrsatori commented on code in PR #1723:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1723#discussion_r1953348166


##########
src/parser/mod.rs:
##########
@@ -1350,7 +1351,15 @@ impl<'a> Parser<'a> {
                     Ok(Some(expr)) => Ok(expr),
 
                     // No expression prefix associated with this word
-                    Ok(None) => 
Ok(self.parse_expr_prefix_by_unreserved_word(&w, span)?),
+                    Ok(None) => {
+                        if dialect_of!(self is PostgreSqlDialect | 
RedshiftSqlDialect)
+                            && GEOMETRIC_TYPES.contains(&w.keyword)
+                        {
+                            self.parse_geometric_type(w.keyword)

Review Comment:
   done



##########
src/parser/mod.rs:
##########
@@ -1496,6 +1532,33 @@ impl<'a> Parser<'a> {
         }
     }
 
+    fn parse_geometric_type(&mut self, keyword: Keyword) -> Result<Expr, 
ParserError> {
+        let token_with_span = self.next_token(); // Get the full TokenWithSpan
+        let value = match token_with_span.token {
+            // Extract the Token field
+            Token::SingleQuotedString(s) => Value::SingleQuotedString(s),
+            _ => return self.expected("SingleQuotedString", token_with_span), 
// Pass full TokenWithSpan
+        };

Review Comment:
   done



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