jayzhan211 commented on code in PR #6796:
URL: https://github.com/apache/arrow-datafusion/pull/6796#discussion_r1310386655
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -422,6 +424,11 @@ fn assert_schema_is_the_same(
prev_plan: &LogicalPlan,
new_plan: &LogicalPlan,
) -> Result<()> {
+ if rule_name == "unnest_expressions" {
Review Comment:
For `select unnest([1,2,3]), unnest(4,5)`,
I found that if I do the `unnest` inside optimization step, I can not avoid
the schema change like List(i64) -> i64.
Therefore, I tried to do the `unnest` for in PhysicalExpr evaluation but
realized that we could only convert unnest expr one by one. This means we need
to `align the size` of them after `evaluation`. To align the result, we need to
add nulls in `ProjectionStream.batch_project`. Not sure if is it a good place
to add nulls for unnested_array, any good idea?
--
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]