MannXo opened a new pull request, #70330:
URL: https://github.com/apache/airflow/pull/70330

   Compute the aggregate-vs-find decision in `execute()` from the rendered 
`mongo_query`, instead of caching `self.is_pipeline = 
isinstance(self.mongo_query, list)` in `__init__`.
   
   `mongo_query` is a template field, so it is rendered after the constructor 
runs. Deriving `is_pipeline` in `__init__` inspects the un-rendered Jinja 
expression, so a `mongo_query` that resolves to a list only after templating 
would be misclassified and sent through `find()` instead of `aggregate()`. 
Deciding in `execute()` uses the rendered value.
   
   Part of the template-field constructor burn-down; removes the 
`MongoToS3Operator` entry from 
`scripts/ci/prek/validate_operators_init_exemptions.txt` in the same PR, as the 
hook requires.
   
   related: #70296
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


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