Tishj commented on issue #13305:
URL: https://github.com/apache/iceberg/issues/13305#issuecomment-2967806028
Ah.. looks like this isn't done because for whatever reason the candidates
have `allOf` referencing the `TableRequirement`
I think this should be solved the same way that it's solved for
`Expression`, by having an `TableRequirementType`
I propose this fix:
```yaml
TableRequirementType:
type: string
enum:
- 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
```
```yaml
TableRequirement:
oneOf:
- $ref: '#/components/schemas/AssertCreate'
- $ref: '#/components/schemas/AssertTableUUID'
- $ref: '#/components/schemas/AssertRefSnapshotId'
- $ref: '#/components/schemas/AssertLastAssignedFieldId'
- $ref: '#/components/schemas/AssertCurrentSchemaId'
- $ref: '#/components/schemas/AssertLastAssignedPartitionId'
- $ref: '#/components/schemas/AssertDefaultSpecId'
- $ref: '#/components/schemas/AssertDefaultSortOrderId'
```
(one of the assertion schemas as example)
```yaml
AssertTableUUID:
type: object
description: The table UUID must match the requirement's `uuid`
required:
- type
- uuid
properties:
type:
$ref: '#/components/schemas/TableRequirementType'
const: assert-table-uuid
uuid:
type: string
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]