shivaam commented on issue #69288:
URL: https://github.com/apache/airflow/issues/69288#issuecomment-5081501458

   For dependency helpers, I think we can preserve the useful behavior of 
Python's `chain()`.
   
   A linear chain:
   
   ```ts
   chain(first, second, third, fourth);
   ```
   
   would create:
   
   ```text
   first -> second -> third -> fourth
   ```
   
   We could also support Python's pairwise behavior for equally sized arrays:
   
   ```ts
   chain(
     first,
     [second, third],
     [fourth, fifth],
     last,
   );
   ```
   
   This would create:
   
   ```text
   first -> second -> fourth -> last
   first -> third  -> fifth  -> last
   ```
   
   The initial API would not need a separate cross-product helper because the 
same graph can be expressed with `before()`:
   
   ```ts
   first.before(third, fourth);
   second.before(third, fourth);
   ```
   
   If this becomes repetitive in real Dags, `crossDownstream()` could be added 
later as a convenience:
   
   ```ts
   crossDownstream(
     [first, second],
     [third, fourth],
   );
   ```
   
   


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