uranusjr commented on code in PR #72019:
URL: https://github.com/apache/airflow/pull/72019#discussion_r4011626502


##########
java-sdk/adr/0002-native-dag-interface.md:
##########
@@ -94,18 +138,57 @@ public final class EtlPipeline_Dag {
     public void execute(Context context, Client client) throws Exception {
       TaskArgs args = TaskArgs.of(context);
       long extracted = args.require(0, Long.class);
-      EtlPipeline tasks = new EtlPipeline();
-      tasks.bind(context, client);
-      client.setXCom(tasks.transform(extracted));
+      double threshold = 0.9; // baked from lit(0.9) at Dag-build time
+      client.setXCom(new EtlPipeline().transform(client, context, extracted, 
threshold));
     }
   }
 
-  // Extract and Load follow the same shape.
+  // Extract, Load, Audit, and Notify follow the same shape.
 }
 ```
 
-`bind(context, client)` is what `getClient()` and `getContext()` return for 
that invocation, and a
-getter called with nothing bound throws.
+The injected arguments are passed straight into the user method, and the data 
arguments bind by
+position through the same internal `TaskArgs` the mixed-language surface uses
+([ADR-0001](0001-mixed-lang-dag-interface.md)) — no getters, no `bind()`, 
nothing ambient.
+
+**Literals.** A data argument is an `Arg<T>`, which a `TaskRef` satisfies; a 
constant is wrapped
+with `lit(...)` — `transform(extract(), lit(0.9))` — and recorded as a baked 
value with no edge.

Review Comment:
   We don’t need to now, but I think this is the only way it would work when we 
eventually implement it. It’s probably not a bad idea to record this now. (We 
can always change the document later if needed.)



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

Reply via email to