You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/05/03 17:13:51 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #23434: Fix literal cross product expansion

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


##########
airflow/models/mappedoperator.py:
##########
@@ -795,7 +795,10 @@ def parse_time_mapped_ti_count(self) -> Optional[int]:
             if not isinstance(value, MAPPABLE_LITERAL_TYPES):
                 # None literal type encountered, so give up
                 return None
-            total += len(value)
+            if total == 0:
+                total = len(value)
+            else:
+                total *= len(value)

Review Comment:
   I think we could have `total = 1` at the beginning of the function instead…?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org