Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
5 changes: 5 additions & 0 deletions tests/sqlparser_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down