Skip to content

Commit 6b61406

Browse files
amogh-jahagirdarzachdisc
authored andcommitted
Spec: Add RemovePartitionSpecsUpdate REST update type (apache#10846)
1 parent 0ca3024 commit 6b61406

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

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

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

373373

374+
class RemovePartitionSpecsUpdate(BaseUpdate):
375+
action: Optional[Literal['remove-partition-specs']] = None
376+
spec_ids: List[int] = Field(..., alias='spec-ids')
377+
378+
374379
class AssertCreate(BaseModel):
375380
"""
376381
The table must not already exist; used for create transactions
@@ -1081,6 +1086,7 @@ class TableUpdate(BaseModel):
10811086
RemovePropertiesUpdate,
10821087
SetStatisticsUpdate,
10831088
RemoveStatisticsUpdate,
1089+
RemovePartitionSpecsUpdate,
10841090
]
10851091

10861092

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

+16
Original file line numberDiff line numberDiff line change
@@ -2320,6 +2320,7 @@ components:
23202320
remove-statistics: '#/components/schemas/RemoveStatisticsUpdate'
23212321
set-partition-statistics: '#/components/schemas/SetPartitionStatisticsUpdate'
23222322
remove-partition-statistics: '#/components/schemas/RemovePartitionStatisticsUpdate'
2323+
remove-partition-specs: '#/components/schemas/RemovePartitionSpecsUpdate'
23232324
type: object
23242325
required:
23252326
- action
@@ -2622,6 +2623,20 @@ components:
26222623
type: integer
26232624
format: int64
26242625

2626+
RemovePartitionSpecsUpdate:
2627+
allOf:
2628+
- $ref: '#/components/schemas/BaseUpdate'
2629+
required:
2630+
- spec-ids
2631+
properties:
2632+
action:
2633+
type: string
2634+
enum: [ "remove-partition-specs" ]
2635+
spec-ids:
2636+
type: array
2637+
items:
2638+
type: integer
2639+
26252640
TableUpdate:
26262641
anyOf:
26272642
- $ref: '#/components/schemas/AssignUUIDUpdate'
@@ -2641,6 +2656,7 @@ components:
26412656
- $ref: '#/components/schemas/RemovePropertiesUpdate'
26422657
- $ref: '#/components/schemas/SetStatisticsUpdate'
26432658
- $ref: '#/components/schemas/RemoveStatisticsUpdate'
2659+
- $ref: '#/components/schemas/RemovePartitionSpecsUpdate'
26442660

26452661
ViewUpdate:
26462662
anyOf:

0 commit comments

Comments
 (0)