flyrain commented on code in PR #10434:
URL: https://github.com/apache/iceberg/pull/10434#discussion_r1626133536


##########
open-api/rest-catalog-open-api.py:
##########
@@ -361,23 +361,29 @@ class RemovePartitionStatisticsUpdate(BaseUpdate):
 
 
 class TableRequirement(BaseModel):
-    type: str
+    type: Literal[
+        'assert-create',
+        'assert-table-uuid',
+        'assert-ref-snapshot-id',
+        'assert-last-assigned-field-id',
+        'assert-current-schema-id',
+        'assert-last-assigned-partition-id',
+        'assert-default-spec-id',
+        'assert-default-sort-order-id',
+    ]
 
 
 class AssertCreate(TableRequirement):
     """
     The table must not already exist; used for create transactions
     """
 
-    type: Literal['assert-create']

Review Comment:
   As I said, we don't have to use inheritance here. I'm OK with union. 



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to