This is an automated email from the ASF dual-hosted git repository.

iffyio pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 9b6f6de0 Allow wilrdacrd for all `SEMANTIC_VIEW` types (#2017)
9b6f6de0 is described below

commit 9b6f6de056f8b26df0fa781e8898be89bc47bcd9
Author: Simon Sawert <si...@sawert.se>
AuthorDate: Fri Aug 29 09:28:51 2025 +0200

    Allow wilrdacrd for all `SEMANTIC_VIEW` types (#2017)
---
 src/parser/mod.rs         | 4 ++--
 tests/sqlparser_common.rs | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index a563e174..f51ddc4d 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -13951,7 +13951,7 @@ impl<'a> Parser<'a> {
                         "DIMENSIONS clause can only be specified 
once".to_string(),
                     ));
                 }
-                dimensions = self.parse_comma_separated(Parser::parse_expr)?;
+                dimensions = 
self.parse_comma_separated(Parser::parse_wildcard_expr)?;
             } else if self.parse_keyword(Keyword::METRICS) {
                 if !metrics.is_empty() {
                     return Err(ParserError::ParserError(
@@ -13965,7 +13965,7 @@ impl<'a> Parser<'a> {
                         "FACTS clause can only be specified once".to_string(),
                     ));
                 }
-                facts = self.parse_comma_separated(Parser::parse_expr)?;
+                facts = 
self.parse_comma_separated(Parser::parse_wildcard_expr)?;
             } else if self.parse_keyword(Keyword::WHERE) {
                 if where_clause.is_some() {
                     return Err(ParserError::ParserError(
diff --git a/tests/sqlparser_common.rs b/tests/sqlparser_common.rs
index 516df5be..1502ee22 100644
--- a/tests/sqlparser_common.rs
+++ b/tests/sqlparser_common.rs
@@ -16952,6 +16952,11 @@ fn test_parse_semantic_view_table_factor() {
             None,
         ),
         ("SELECT * FROM SEMANTIC_VIEW(model METRICS orders.*)", None),
+        ("SELECT * FROM SEMANTIC_VIEW(model FACTS fact.*)", None),
+        (
+            "SELECT * FROM SEMANTIC_VIEW(model DIMENSIONS dim.* METRICS 
orders.*)",
+            None,
+        ),
         // We can parse in any order but will always produce a result in a 
fixed order.
         (
             "SELECT * FROM SEMANTIC_VIEW(model WHERE x > 0 DIMENSIONS dim1)",


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

Reply via email to