mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Support wildcard metrics for SEMANTIC_VIEW (#2016)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run
This commit is contained in:
parent
bc478b0531
commit
ee707c72a7
3 changed files with 7 additions and 4 deletions
|
|
@ -1429,7 +1429,7 @@ pub enum TableFactor {
|
|||
/// List of dimensions or expression referring to dimensions (e.g. DATE_PART('year', col))
|
||||
dimensions: Vec<Expr>,
|
||||
/// List of metrics (references to objects like orders.value, value, orders.*)
|
||||
metrics: Vec<ObjectName>,
|
||||
metrics: Vec<Expr>,
|
||||
/// List of facts or expressions referring to facts or dimensions.
|
||||
facts: Vec<Expr>,
|
||||
/// WHERE clause for filtering
|
||||
|
|
|
|||
|
|
@ -13958,7 +13958,7 @@ impl<'a> Parser<'a> {
|
|||
"METRICS clause can only be specified once".to_string(),
|
||||
));
|
||||
}
|
||||
metrics = self.parse_comma_separated(|parser| parser.parse_object_name(true))?;
|
||||
metrics = self.parse_comma_separated(Parser::parse_wildcard_expr)?;
|
||||
} else if self.parse_keyword(Keyword::FACTS) {
|
||||
if !facts.is_empty() {
|
||||
return Err(ParserError::ParserError(
|
||||
|
|
@ -13975,7 +13975,10 @@ impl<'a> Parser<'a> {
|
|||
where_clause = Some(self.parse_expr()?);
|
||||
} else {
|
||||
return parser_err!(
|
||||
"Expected one of DIMENSIONS, METRICS, FACTS or WHERE",
|
||||
format!(
|
||||
"Expected one of DIMENSIONS, METRICS, FACTS or WHERE, got {}",
|
||||
self.peek_token().token
|
||||
),
|
||||
self.peek_token().span.start
|
||||
)?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue