iffyio commented on code in PR #1969: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1969#discussion_r2242287686
########## src/parser/mod.rs: ########## @@ -13882,11 +13892,25 @@ impl<'a> Parser<'a> { None }; self.expect_token(&Token::LParen)?; - let value = self.parse_identifier()?; + let value = match self.peek_token_ref().token { + Token::LParen => { + // multi value column unpivot + Expr::Tuple( + self.parse_parenthesized_column_list(Mandatory, false)? + .into_iter() + .map(Expr::Identifier) + .collect(), + ) + } + _ => { + // single value column unpivot + Expr::Identifier(self.parse_identifier()?) + } Review Comment: Can we call `self.parse_expr()` and `self.parse_expr_with_alias()` transparently instead? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org