Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/namespace/operations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ See [REST Routes](../../catalog/rest/index.md#rest-routes) for more details.
| AlterTableBackfillColumns | 1 | | ✓ | | | ✓ | |
| AlterTableDropColumns | 1 | | ✓ | | ✓ | | |
| RefreshMaterializedView | 1 | | ✓ | | | ✓ | |
| UpdateFieldMetadata | 1 | | ✓ | | ✓ | | |
| UpdateTableSchemaMetadata | 1 | | ✓ | | ✓ | | |
| GetTableStats | 1 | | ✓ | | ✓ | | |
| ListTableTags | 1 | | ✓ | | ✓ | | |
Expand Down
15 changes: 15 additions & 0 deletions docs/src/namespace/operations/models/UpdateFieldMetadataEntry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# UpdateFieldMetadataEntry


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**path** | **String** | Field (column) path whose metadata to update | |
|**metadata** | **Map<String, String>** | Metadata key-value pairs to apply to the field. A null value deletes that key. | |
|**replace** | **Boolean** | If true, replace the field's existing metadata entirely; otherwise merge into it (optional, defaults to false). | [optional] |



15 changes: 15 additions & 0 deletions docs/src/namespace/operations/models/UpdateFieldMetadataRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# UpdateFieldMetadataRequest


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**identity** | [**Identity**](Identity.md) | | [optional] |
|**id** | **List<String>** | Table identifier path (namespace + table name) | [optional] |
|**updates** | [**List<UpdateFieldMetadataEntry>**](UpdateFieldMetadataEntry.md) | List of per-field metadata updates to apply | |



Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


# UpdateFieldMetadataResponse


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**version** | **Long** | The commit version associated with the operation | |
|**fields** | **Map<String, Map<String, String>>** | Resulting metadata for each updated field, keyed by field path. | [optional] |



108 changes: 108 additions & 0 deletions docs/src/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,44 @@ paths:
5XX:
$ref: "#/components/responses/ServerErrorResponse"

/v1/table/{id}/update_field_metadata:
parameters:
- $ref: "#/components/parameters/id"
- $ref: "#/components/parameters/delimiter"
post:
tags:
- Table
- Metadata
summary: Update per-field metadata
operationId: UpdateFieldMetadata
description: |
Update the Arrow field (column) metadata for table `id`.

Each entry targets a field by `path` and merges the provided key-value
pairs into that field's existing metadata, or replaces it when `replace`
is true. A null metadata value deletes that key.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateFieldMetadataRequest"
responses:
200:
$ref: "#/components/responses/UpdateFieldMetadataResponse"
400:
$ref: "#/components/responses/BadRequestErrorResponse"
401:
$ref: "#/components/responses/UnauthorizedErrorResponse"
403:
$ref: "#/components/responses/ForbiddenErrorResponse"
404:
$ref: "#/components/responses/NotFoundErrorResponse"
503:
$ref: "#/components/responses/ServiceUnavailableErrorResponse"
5XX:
$ref: "#/components/responses/ServerErrorResponse"

/v1/table/{id}/drop_columns:
parameters:
- $ref: "#/components/parameters/id"
Expand Down Expand Up @@ -4726,6 +4764,69 @@ components:
description: The commit version associated with the operation
minimum: 0

UpdateFieldMetadataRequest:
type: object
required:
- updates
properties:
identity:
$ref: "#/components/schemas/Identity"
id:
type: array
items:
type: string
description: Table identifier path (namespace + table name)
updates:
type: array
items:
$ref: "#/components/schemas/UpdateFieldMetadataEntry"
description: List of per-field metadata updates to apply

UpdateFieldMetadataEntry:
type: object
required:
- path
- metadata
properties:
path:
type: string
description: Field (column) path whose metadata to update
metadata:
type: object
additionalProperties:
type:
- string
- "null"
description: |
Metadata key-value pairs to apply to the field. A null value
deletes that key.
replace:
type:
- boolean
- "null"
description: |
If true, replace the field's existing metadata entirely; otherwise
merge into it (optional, defaults to false).

UpdateFieldMetadataResponse:
type: object
required:
- version
properties:
version:
type: integer
format: int64
description: The commit version associated with the operation
minimum: 0
fields:
type: object
additionalProperties:
type: object
additionalProperties:
type: string
description: |
Resulting metadata for each updated field, keyed by field path.

AlterTableAlterColumnsRequest:
type: object
required:
Expand Down Expand Up @@ -5648,6 +5749,13 @@ components:
schema:
$ref: "#/components/schemas/AlterTableAddColumnsResponse"

UpdateFieldMetadataResponse:
description: Field metadata update result
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateFieldMetadataResponse"

AlterTableAlterColumnsResponse:
description: Alter columns operation result
content:
Expand Down
5 changes: 5 additions & 0 deletions java/lance-namespace-apache-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Class | Method | HTTP request | Description
*MetadataApi* | [**renameTable**](docs/MetadataApi.md#renameTable) | **POST** /v1/table/{id}/rename | Rename a table
*MetadataApi* | [**restoreTable**](docs/MetadataApi.md#restoreTable) | **POST** /v1/table/{id}/restore | Restore table to a specific version
*MetadataApi* | [**tableExists**](docs/MetadataApi.md#tableExists) | **POST** /v1/table/{id}/exists | Check if a table exists
*MetadataApi* | [**updateFieldMetadata**](docs/MetadataApi.md#updateFieldMetadata) | **POST** /v1/table/{id}/update_field_metadata | Update per-field metadata
*MetadataApi* | [**updateTableSchemaMetadata**](docs/MetadataApi.md#updateTableSchemaMetadata) | **POST** /v1/table/{id}/schema_metadata/update | Update table schema metadata
*MetadataApi* | [**updateTableTag**](docs/MetadataApi.md#updateTableTag) | **POST** /v1/table/{id}/tags/update | Update a tag to point to a different version
*NamespaceApi* | [**createNamespace**](docs/NamespaceApi.md#createNamespace) | **POST** /v1/namespace/{id}/create | Create a new namespace
Expand Down Expand Up @@ -233,6 +234,7 @@ Class | Method | HTTP request | Description
*TableApi* | [**renameTable**](docs/TableApi.md#renameTable) | **POST** /v1/table/{id}/rename | Rename a table
*TableApi* | [**restoreTable**](docs/TableApi.md#restoreTable) | **POST** /v1/table/{id}/restore | Restore table to a specific version
*TableApi* | [**tableExists**](docs/TableApi.md#tableExists) | **POST** /v1/table/{id}/exists | Check if a table exists
*TableApi* | [**updateFieldMetadata**](docs/TableApi.md#updateFieldMetadata) | **POST** /v1/table/{id}/update_field_metadata | Update per-field metadata
*TableApi* | [**updateTable**](docs/TableApi.md#updateTable) | **POST** /v1/table/{id}/update | Update rows in a table
*TableApi* | [**updateTableSchemaMetadata**](docs/TableApi.md#updateTableSchemaMetadata) | **POST** /v1/table/{id}/schema_metadata/update | Update table schema metadata
*TableApi* | [**updateTableTag**](docs/TableApi.md#updateTableTag) | **POST** /v1/table/{id}/tags/update | Update a tag to point to a different version
Expand Down Expand Up @@ -373,6 +375,9 @@ Class | Method | HTTP request | Description
- [TableExistsRequest](docs/TableExistsRequest.md)
- [TableVersion](docs/TableVersion.md)
- [TagContents](docs/TagContents.md)
- [UpdateFieldMetadataEntry](docs/UpdateFieldMetadataEntry.md)
- [UpdateFieldMetadataRequest](docs/UpdateFieldMetadataRequest.md)
- [UpdateFieldMetadataResponse](docs/UpdateFieldMetadataResponse.md)
- [UpdateTableRequest](docs/UpdateTableRequest.md)
- [UpdateTableResponse](docs/UpdateTableResponse.md)
- [UpdateTableSchemaMetadataRequest](docs/UpdateTableSchemaMetadataRequest.md)
Expand Down
127 changes: 127 additions & 0 deletions java/lance-namespace-apache-client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,49 @@ paths:
x-content-type: application/json
x-accepts:
- application/json
/v1/table/{id}/update_field_metadata:
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/delimiter'
post:
description: |
Update the Arrow field (column) metadata for table `id`.

Each entry targets a field by `path` and merges the provided key-value
pairs into that field's existing metadata, or replaces it when `replace`
is true. A null metadata value deletes that key.
operationId: UpdateFieldMetadata
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/delimiter'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFieldMetadataRequest'
required: true
responses:
"200":
$ref: '#/components/responses/UpdateFieldMetadataResponse'
"400":
$ref: '#/components/responses/BadRequestErrorResponse'
"401":
$ref: '#/components/responses/UnauthorizedErrorResponse'
"403":
$ref: '#/components/responses/ForbiddenErrorResponse'
"404":
$ref: '#/components/responses/NotFoundErrorResponse'
"503":
$ref: '#/components/responses/ServiceUnavailableErrorResponse'
"5XX":
$ref: '#/components/responses/ServerErrorResponse'
summary: Update per-field metadata
tags:
- Table
- Metadata
x-content-type: application/json
x-accepts:
- application/json
/v1/table/{id}/drop_columns:
parameters:
- $ref: '#/components/parameters/id'
Expand Down Expand Up @@ -2837,6 +2880,12 @@ components:
schema:
$ref: '#/components/schemas/AlterTableAddColumnsResponse'
description: Add columns operation result
UpdateFieldMetadataResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFieldMetadataResponse'
description: Field metadata update result
AlterTableAlterColumnsResponse:
content:
application/json:
Expand Down Expand Up @@ -7296,6 +7345,84 @@ components:
type: integer
required:
- version
UpdateFieldMetadataRequest:
example:
identity:
api_key: api_key
auth_token: auth_token
id:
- id
- id
updates:
- path: path
metadata:
key: metadata
replace: true
- path: path
metadata:
key: metadata
replace: true
properties:
identity:
$ref: '#/components/schemas/Identity'
id:
description: Table identifier path (namespace + table name)
items:
type: string
type: array
updates:
description: List of per-field metadata updates to apply
items:
$ref: '#/components/schemas/UpdateFieldMetadataEntry'
type: array
required:
- updates
UpdateFieldMetadataEntry:
example:
path: path
metadata:
key: metadata
replace: true
properties:
path:
description: Field (column) path whose metadata to update
type: string
metadata:
additionalProperties:
nullable: true
type: string
description: |
Metadata key-value pairs to apply to the field. A null value
deletes that key.
replace:
description: |
If true, replace the field's existing metadata entirely; otherwise
merge into it (optional, defaults to false).
nullable: true
type: boolean
required:
- metadata
- path
UpdateFieldMetadataResponse:
example:
fields:
key:
key: fields
version: 0
properties:
version:
description: The commit version associated with the operation
format: int64
minimum: 0
type: integer
fields:
additionalProperties:
additionalProperties:
type: string
description: |
Resulting metadata for each updated field, keyed by field path.
required:
- version
AlterTableAlterColumnsRequest:
example:
identity:
Expand Down
Loading
Loading