chenkovsky commented on code in PR #1969: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1969#discussion_r2242950299
########## 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: parse_expr may accept some invalid sql. -- 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