feat: support multi value columns and aliases in unpivot (#1969)
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:
Chen Chongchen 2025-08-01 22:52:41 +08:00 committed by GitHub
parent ec0026d136
commit dd650b88f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 144 additions and 30 deletions

View file

@ -14033,11 +14033,13 @@ impl<'a> Parser<'a> {
None
};
self.expect_token(&Token::LParen)?;
let value = self.parse_identifier()?;
let value = self.parse_expr()?;
self.expect_keyword_is(Keyword::FOR)?;
let name = self.parse_identifier()?;
self.expect_keyword_is(Keyword::IN)?;
let columns = self.parse_parenthesized_column_list(Mandatory, false)?;
let columns = self.parse_parenthesized_column_list_inner(Mandatory, false, |p| {
p.parse_expr_with_alias()
})?;
self.expect_token(&Token::RParen)?;
let alias = self.maybe_parse_table_alias()?;
Ok(TableFactor::Unpivot {