duongcongtoai commented on code in PR #12836:
URL: https://github.com/apache/datafusion/pull/12836#discussion_r1807732857
##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -2263,24 +2238,20 @@ mod tests {
// Simultaneously unnesting a list (with different depth) and a struct
column
let plan = nested_table_scan("test_table")?
- .unnest_columns_recursive_with_options(
- vec![
- (
- "stringss".into(),
- ColumnUnnestType::List(vec![
- ColumnUnnestList {
- output_column:
Column::from_name("stringss_depth_1"),
- depth: 1,
- },
- ColumnUnnestList {
- output_column:
Column::from_name("stringss_depth_2"),
- depth: 2,
- },
- ]),
- ),
- ("struct_singular".into(), ColumnUnnestType::Inferred),
- ],
- UnnestOptions::default(),
+ .unnest_columns_with_options(
+ vec!["stringss".into(), "struct_singular".into()],
+ UnnestOptions::default().with_recursions(vec![
+ RecursionUnnestOption {
+ input_column: "stringss".into(),
+ output_column: "stringss_depth_1".into(),
+ depth: 1,
+ },
+ RecursionUnnestOption {
+ input_column: "stringss".into(),
+ output_column: "stringss_depth_2".into(),
+ depth: 2,
+ },
+ ]),
Review Comment:
thank you, i refactored so that the recursion is optional at column level,
and since None can be replaced by an empty vector, i simplified the type of
this field from Option<Vec> to Vec
--
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]