uranusjr opened a new pull request #21328:
URL: https://github.com/apache/airflow/pull/21328


   Need to get #21210 merged first and rebase this.
   
   This rewrites how `map()` is implemented on `_TaskDecorator`. The previous 
implementation incorrectly assumed mapping a task decorator works like mapping 
a traditional operator, but in fact they have entirely different semantics.
   
   When mapping a traditional operator, `FooOperator.map(my_arg=[1, 2, 3])`, 
the argument on _`FooOperator`_ is mapped. But when mapping a task decorator, 
`my_task.map(my_val=[1, 2, 3])`, it’s the argument on _the function wrapped by 
the task object_ being mapped. Therefore, mapped (and also partial-ed) values 
for `my_val` should go into the `DecoratedOperator`’s `op_kwargs` (and 
`op_args`) arguments instead.
   
   An end-to-end test is provided to validate the simplest case of this.


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