Repository navigation
fix(common.sql): convert page_size and commit_every in mapped GenericTransfer tasks - #77169
Open
DYNOSuprovo wants to merge 2 commits into
Open
DYNOSuprovo wants to merge 2 commits into
DYNOSuprovo wants to merge 2 commits into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
GenericTransfer, string conversions for templatedpage_sizeandinsert_args["commit_every"]were previously performed inside arender_template_fieldsoverride.When
GenericTransferis used in a mapped task (via.partial(...).expand(...)),MappedOperator.render_template_fieldsunmaps the task and renders through_do_render_template_fieldson the unmapped operator. As a result,GenericTransfer.render_template_fieldswas never called in mapped tasks, leavingpage_sizeandcommit_everyas strings (e.g."1000"), which subsequently causedTypeError: '<' not supported between instances of 'int' and 'str'andTypeError: unsupported operand type(s) for +=: 'int' and 'str'during pagination.This mirrors the issue resolved in
SqlToS3Operator(#77151 / #77153).This change:
_do_render_template_fieldswith a guard forparent is self, ensuring that both plain and mapped tasks properly convertpage_sizeandcommit_everytoint.test_generic_transfer.pyverifying that_do_render_template_fieldscorrectly converts string inputs to integers.^ Add meaningful description above
Read the Pull Request Guidelines for more information.