gstvg commented on code in PR #21193:
URL: https://github.com/apache/datafusion/pull/21193#discussion_r3208959705


##########
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs:
##########
@@ -1951,26 +1938,12 @@ async fn 
roundtrip_array_transform_higher_order_function() -> Result<()> {
     roundtrip_with_ctx("SELECT array_transform2([[data3.p1]], p0 -> 
array_transform2(p0, p2 -> p2 * 2)) from data3", ctx.clone())
         .await?;
 
-    // there's no support for lambda capturing columns or variables of outer 
lambdas yet so assert the plans instead of round tripping
-    // also, since substrait doesn't encode lambda parameters names, they got 
generated, non-conflicting names during consumption
-    // testing name shadowing requires to assert against the generated plan 
and check the correct parameter usage instead of round tripping
-
     // nested with multiple parameters without variable shadowing
-    let plan = generate_plan_from_sql_with_ctx(
-        "SELECT array_transform2([[data3.p1]], (a, ai) -> array_transform2(a, 
(v, vi) -> ai * v * vi)) from data3",
-        true,
-        true,
-        &ctx,
-    )
-    .await?;
+    roundtrip_with_ctx("SELECT array_transform2([[data3.p1]], (p0, p2) -> 
array_transform2(p0, (p3, p4) -> p2 * p3 * p4)) from data3", ctx.clone())
+        .await?;
 
-    assert_snapshot!(
-    plan,
-    @"
-    Projection: array_transform2(make_array(make_array(data3.p1)), (p0, p2) -> 
array_transform2(p0, (p3, p4) -> p2 * p3 * p4)) AS 
array_transform2(make_array(make_array(data3.p1)),(a, ai) -> 
array_transform2(a,(v, vi) -> ai * v * vi))
-      TableScan: data3 projection=[p1]
-    "
-    );

Review Comment:
   @benbellick capture support got merged and we can use roundtrip now



-- 
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]

Reply via email to