Skip to content

Commit 46ef535

Browse files
Spec: Add RemovePartitionSpecsUpdate as a possible update type
1 parent 4a0ae22 commit 46ef535

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

open-api/rest-catalog-open-api.py

+6
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ class RemovePartitionStatisticsUpdate(BaseUpdate):
360360
snapshot_id: int = Field(..., alias='snapshot-id')
361361

362362

363+
class RemovePartitionSpecsUpdate(BaseUpdate):
364+
action: Optional[Literal['remove-partition-specs']] = None
365+
spec_ids: List[int] = Field(..., alias='spec-ids')
366+
367+
363368
class AssertCreate(BaseModel):
364369
"""
365370
The table must not already exist; used for create transactions
@@ -1070,6 +1075,7 @@ class TableUpdate(BaseModel):
10701075
RemovePropertiesUpdate,
10711076
SetStatisticsUpdate,
10721077
RemoveStatisticsUpdate,
1078+
RemovePartitionSpecsUpdate,
10731079
]
10741080

10751081

open-api/rest-catalog-open-api.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,7 @@ components:
22652265
remove-statistics: '#/components/schemas/RemoveStatisticsUpdate'
22662266
set-partition-statistics: '#/components/schemas/SetPartitionStatisticsUpdate'
22672267
remove-partition-statistics: '#/components/schemas/RemovePartitionStatisticsUpdate'
2268+
remove-partition-specs: '#/components/schemas/RemovePartitionSpecsUpdate'
22682269
type: object
22692270
required:
22702271
- action
@@ -2567,6 +2568,21 @@ components:
25672568
type: integer
25682569
format: int64
25692570

2571+
RemovePartitionSpecsUpdate:
2572+
allOf:
2573+
- $ref: '#/components/schemas/BaseUpdate'
2574+
required:
2575+
- spec-ids
2576+
properties:
2577+
action:
2578+
type: string
2579+
enum: [ "remove-partition-specs" ]
2580+
spec-ids:
2581+
type: array
2582+
items:
2583+
type: integer
2584+
format: int64
2585+
25702586
TableUpdate:
25712587
anyOf:
25722588
- $ref: '#/components/schemas/AssignUUIDUpdate'
@@ -2586,6 +2602,7 @@ components:
25862602
- $ref: '#/components/schemas/RemovePropertiesUpdate'
25872603
- $ref: '#/components/schemas/SetStatisticsUpdate'
25882604
- $ref: '#/components/schemas/RemoveStatisticsUpdate'
2605+
- $ref: '#/components/schemas/RemovePartitionSpecsUpdate'
25892606

25902607
ViewUpdate:
25912608
anyOf:

0 commit comments

Comments
 (0)