This commit is contained in:
Chongchen Chen 2025-08-08 09:02:14 +08:00
parent a2453366f9
commit 12f8543a07
2 changed files with 1 additions and 10 deletions

View file

@ -1336,7 +1336,7 @@ pub enum TableFactor {
Pivot {
table: Box<TableFactor>,
aggregate_functions: Vec<ExprWithAlias>, // Function expression
value_column: Vec<Expr>, // Expr is a identifier or a compound identifier
value_column: Vec<Expr>,
value_source: PivotValueSource,
default_on_null: Option<Expr>,
alias: Option<TableAlias>,

View file

@ -10925,15 +10925,6 @@ fn parse_pivot_table() {
verified_stmt(sql_without_table_alias).to_string(),
sql_without_table_alias
);
let sql_with_multiple_value_column = concat!(
"SELECT * FROM person ",
"PIVOT(SUM(age) AS a, AVG(class) AS c FOR (name, age) IN (('John', 30) AS c1, ('Mike', 40) AS c2))"
);
assert_eq!(
verified_stmt(sql_with_multiple_value_column).to_string(),
sql_with_multiple_value_column
);
}
#[test]