alamb commented on code in PR #21432:
URL: https://github.com/apache/datafusion/pull/21432#discussion_r3045056334
##########
datafusion-examples/examples/relation_planner/pivot_unpivot.rs:
##########
@@ -434,7 +482,7 @@ fn plan_pivot(
for (value_alias, pivot_value) in &pivot_values {
// CASE pivot_col WHEN pivot_value THEN agg_input END
- let case_expr = case(col(&pivot_col_name))
+ let case_expr = case(pivot_col.clone())
Review Comment:
this is the real fix, right?
##########
datafusion-examples/examples/relation_planner/pivot_unpivot.rs:
##########
@@ -415,11 +462,12 @@ fn plan_pivot(
.collect();
let group_by_cols: Vec<Expr> = schema
- .fields()
.iter()
- .map(|f| f.name().as_str())
- .filter(|name| *name != pivot_col_name.as_str() &&
!agg_input_cols.contains(name))
- .map(col)
+ .filter(|(_, field)| {
Review Comment:
is this change necessary? It seems like it is more verbose but does the same
thing
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]