flyrain commented on code in PR #10434: URL: https://github.com/apache/iceberg/pull/10434#discussion_r1626139854
########## 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: BTW, why do we need a field `type` in python classes to indicate its type(class name)? -- 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