Skip to content

Commit 8a19626

Browse files
bombsimonayman-sigma
authored andcommitted
Allow wilrdacrd for all SEMANTIC_VIEW types (apache#2017)
1 parent 2128e6a commit 8a19626

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/parser/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13983,7 +13983,7 @@ impl<'a> Parser<'a> {
1398313983
"DIMENSIONS clause can only be specified once".to_string(),
1398413984
));
1398513985
}
13986-
dimensions = self.parse_comma_separated(Parser::parse_expr)?;
13986+
dimensions = self.parse_comma_separated(Parser::parse_wildcard_expr)?;
1398713987
} else if self.parse_keyword(Keyword::METRICS) {
1398813988
if !metrics.is_empty() {
1398913989
return Err(ParserError::ParserError(
@@ -13997,7 +13997,7 @@ impl<'a> Parser<'a> {
1399713997
"FACTS clause can only be specified once".to_string(),
1399813998
));
1399913999
}
14000-
facts = self.parse_comma_separated(Parser::parse_expr)?;
14000+
facts = self.parse_comma_separated(Parser::parse_wildcard_expr)?;
1400114001
} else if self.parse_keyword(Keyword::WHERE) {
1400214002
if where_clause.is_some() {
1400314003
return Err(ParserError::ParserError(

tests/sqlparser_common.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16978,6 +16978,11 @@ fn test_parse_semantic_view_table_factor() {
1697816978
None,
1697916979
),
1698016980
("SELECT * FROM SEMANTIC_VIEW(model METRICS orders.*)", None),
16981+
("SELECT * FROM SEMANTIC_VIEW(model FACTS fact.*)", None),
16982+
(
16983+
"SELECT * FROM SEMANTIC_VIEW(model DIMENSIONS dim.* METRICS orders.*)",
16984+
None,
16985+
),
1698116986
// We can parse in any order but will always produce a result in a fixed order.
1698216987
(
1698316988
"SELECT * FROM SEMANTIC_VIEW(model WHERE x > 0 DIMENSIONS dim1)",

0 commit comments

Comments
 (0)