Skip to content

Commit 9b6f6de

Browse files
authored
Allow wilrdacrd for all SEMANTIC_VIEW types (#2017)
1 parent ee707c7 commit 9b6f6de

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/parser/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13951,7 +13951,7 @@ impl<'a> Parser<'a> {
1395113951
"DIMENSIONS clause can only be specified once".to_string(),
1395213952
));
1395313953
}
13954-
dimensions = self.parse_comma_separated(Parser::parse_expr)?;
13954+
dimensions = self.parse_comma_separated(Parser::parse_wildcard_expr)?;
1395513955
} else if self.parse_keyword(Keyword::METRICS) {
1395613956
if !metrics.is_empty() {
1395713957
return Err(ParserError::ParserError(
@@ -13965,7 +13965,7 @@ impl<'a> Parser<'a> {
1396513965
"FACTS clause can only be specified once".to_string(),
1396613966
));
1396713967
}
13968-
facts = self.parse_comma_separated(Parser::parse_expr)?;
13968+
facts = self.parse_comma_separated(Parser::parse_wildcard_expr)?;
1396913969
} else if self.parse_keyword(Keyword::WHERE) {
1397013970
if where_clause.is_some() {
1397113971
return Err(ParserError::ParserError(

tests/sqlparser_common.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16952,6 +16952,11 @@ fn test_parse_semantic_view_table_factor() {
1695216952
None,
1695316953
),
1695416954
("SELECT * FROM SEMANTIC_VIEW(model METRICS orders.*)", None),
16955+
("SELECT * FROM SEMANTIC_VIEW(model FACTS fact.*)", None),
16956+
(
16957+
"SELECT * FROM SEMANTIC_VIEW(model DIMENSIONS dim.* METRICS orders.*)",
16958+
None,
16959+
),
1695516960
// We can parse in any order but will always produce a result in a fixed order.
1695616961
(
1695716962
"SELECT * FROM SEMANTIC_VIEW(model WHERE x > 0 DIMENSIONS dim1)",

0 commit comments

Comments
 (0)