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


##########
task_sdk/src/airflow/sdk/api/datamodels/_generated.py:
##########
@@ -239,7 +239,7 @@ class TaskInstance(BaseModel):
     dag_id: Annotated[str, Field(title="Dag Id")]
     run_id: Annotated[str, Field(title="Run Id")]
     try_number: Annotated[int, Field(title="Try Number")]
-    map_index: Annotated[int, Field(title="Map Index")] = -1
+    map_index: Annotated[int | None, Field(title="Map Index")] = None

Review Comment:
   So the goal is somewhat like this?
   
   * In SDK side, None means unmapped and (non-negative) int means mapped
   * In DB, -1 means unmapped and non-negative int means mapped
   
   I wonder if we should also add something to ensure negative ints are 
eliminated when None is used.



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