(
&self,
input: &LogicalPlan,
expr: &Expr,
)
| 536 | } |
| 537 | |
| 538 | fn get_struct_unnest_columns( |
| 539 | &self, |
| 540 | input: &LogicalPlan, |
| 541 | expr: &Expr, |
| 542 | ) -> Result<Option<Vec<Column>>> { |
| 543 | let unnest_expr = match expr { |
| 544 | Expr::Unnest(unnest_expr) => Some(unnest_expr), |
| 545 | Expr::Alias(alias) => match alias.expr.as_ref() { |
| 546 | Expr::Unnest(unnest_expr) => Some(unnest_expr), |
| 547 | _ => None, |
| 548 | }, |
| 549 | _ => None, |
| 550 | }; |
| 551 | |
| 552 | let Some(unnest_expr) = unnest_expr else { |
| 553 | return Ok(None); |
| 554 | }; |
| 555 | |
| 556 | let field = unnest_expr.expr.to_field(input.schema())?.1; |
| 557 | let DataType::Struct(inner_fields) = field.data_type() else { |
| 558 | return Ok(None); |
| 559 | }; |
| 560 | |
| 561 | Ok(Some(get_struct_unnested_columns( |
| 562 | &unnest_expr.expr.schema_name().to_string(), |
| 563 | inner_fields, |
| 564 | ))) |
| 565 | } |
| 566 | |
| 567 | fn try_process_aggregate_unnest(&self, input: LogicalPlan) -> Result<LogicalPlan> { |
| 568 | match input { |
no test coverage detected