Allow wilrdacrd for all SEMANTIC_VIEW types (#2017)
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled

This commit is contained in:
Simon Sawert 2025-08-29 09:28:51 +02:00 committed by GitHub
parent ee707c72a7
commit 9b6f6de056
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -13951,7 +13951,7 @@ impl<'a> Parser<'a> {
"DIMENSIONS clause can only be specified once".to_string(), "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) { } else if self.parse_keyword(Keyword::METRICS) {
if !metrics.is_empty() { if !metrics.is_empty() {
return Err(ParserError::ParserError( return Err(ParserError::ParserError(
@ -13965,7 +13965,7 @@ impl<'a> Parser<'a> {
"FACTS clause can only be specified once".to_string(), "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) { } else if self.parse_keyword(Keyword::WHERE) {
if where_clause.is_some() { if where_clause.is_some() {
return Err(ParserError::ParserError( return Err(ParserError::ParserError(

View file

@ -16952,6 +16952,11 @@ fn test_parse_semantic_view_table_factor() {
None, None,
), ),
("SELECT * FROM SEMANTIC_VIEW(model METRICS orders.*)", 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. // 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)", "SELECT * FROM SEMANTIC_VIEW(model WHERE x > 0 DIMENSIONS dim1)",