From 13963ae6d607d3ea9d35f7944f5c6ce0f09c005f Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 17:32:59 +0000 Subject: [PATCH] feat(indexes): add source_column field to index responses --- CHANGELOG.md | 6 ++++++ docs/IndexEntryResponse.md | 1 + docs/IndexInfoResponse.md | 1 + docs/JobResult.md | 1 + docs/QueryApi.md | 2 +- hotdata/api_client.py | 2 +- hotdata/models/index_entry_response.py | 4 +++- hotdata/models/index_info_response.py | 9 ++++++++- pyproject.toml | 2 +- test/test_index_entry_response.py | 1 + test/test_index_info_response.py | 1 + test/test_job_result.py | 1 + test/test_list_indexes_response.py | 2 ++ 13 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 959656a..ce5411b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.2] - 2026-06-18 + +### Changed + +- feat(indexes): add source_column field to index responses + ## [0.4.1] - 2026-06-17 ### Changed diff --git a/docs/IndexEntryResponse.md b/docs/IndexEntryResponse.md index 6129383..39ecf2c 100644 --- a/docs/IndexEntryResponse.md +++ b/docs/IndexEntryResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **index_name** | **str** | | **index_type** | **str** | | **metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional] **status** | [**IndexStatus**](IndexStatus.md) | | **updated_at** | **datetime** | | **connection_id** | **str** | | [optional] diff --git a/docs/IndexInfoResponse.md b/docs/IndexInfoResponse.md index ef2c65b..69b909b 100644 --- a/docs/IndexInfoResponse.md +++ b/docs/IndexInfoResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **index_name** | **str** | | **index_type** | **str** | | **metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional] **status** | [**IndexStatus**](IndexStatus.md) | | **updated_at** | **datetime** | | diff --git a/docs/JobResult.md b/docs/JobResult.md index 79c6fb9..9b6a37d 100644 --- a/docs/JobResult.md +++ b/docs/JobResult.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **index_name** | **str** | | **index_type** | **str** | | **metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional] **updated_at** | **datetime** | | ## Example diff --git a/docs/QueryApi.md b/docs/QueryApi.md index bd6b254..2a1607b 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -104,7 +104,7 @@ Name | Type | Description | Notes **202** | Query submitted asynchronously | - | **400** | Invalid request (no database specified, or header/body database_id conflict) | - | **404** | Database not found | - | -**429** | Too many concurrent queries; retry after the Retry-After delay | - | +**429** | The engine was too busy to run this query right now — too many concurrent queries, or not enough memory available (often because of other queries running at the same time). Retry after the Retry-After delay; if it persists, narrowing the query (add a filter or LIMIT) may help. | - | **500** | Internal server error | - | **503** | Result store temporarily unavailable (a truncated result could not be persisted); retry after the Retry-After delay | - | diff --git a/hotdata/api_client.py b/hotdata/api_client.py index ecbadea..db4656e 100644 --- a/hotdata/api_client.py +++ b/hotdata/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.4.1/python' + self.user_agent = 'OpenAPI-Generator/0.4.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/hotdata/models/index_entry_response.py b/hotdata/models/index_entry_response.py index 3cb7a23..4105c04 100644 --- a/hotdata/models/index_entry_response.py +++ b/hotdata/models/index_entry_response.py @@ -34,12 +34,13 @@ class IndexEntryResponse(BaseModel): index_name: StrictStr index_type: StrictStr metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.") + source_column: Optional[StrictStr] = Field(default=None, description="Source text column for an embedding-backed vector index. A query searches it via `vector_distance(, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes.") status: IndexStatus updated_at: datetime connection_id: Optional[StrictStr] = None schema_name: StrictStr table_name: StrictStr - __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at", "connection_id", "schema_name", "table_name"] + __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "source_column", "status", "updated_at", "connection_id", "schema_name", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -102,6 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "index_name": obj.get("index_name"), "index_type": obj.get("index_type"), "metric": obj.get("metric"), + "source_column": obj.get("source_column"), "status": obj.get("status"), "updated_at": obj.get("updated_at"), "connection_id": obj.get("connection_id"), diff --git a/hotdata/models/index_info_response.py b/hotdata/models/index_info_response.py index 72f9d62..a428063 100644 --- a/hotdata/models/index_info_response.py +++ b/hotdata/models/index_info_response.py @@ -34,9 +34,10 @@ class IndexInfoResponse(BaseModel): index_name: StrictStr index_type: StrictStr metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.") + source_column: Optional[StrictStr] = Field(default=None, description="Source text column for an embedding-backed vector index. A query searches it via `vector_distance(, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes.") status: IndexStatus updated_at: datetime - __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at"] + __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "source_column", "status", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: if self.metric is None and "metric" in self.model_fields_set: _dict['metric'] = None + # set to None if source_column (nullable) is None + # and model_fields_set contains the field + if self.source_column is None and "source_column" in self.model_fields_set: + _dict['source_column'] = None + return _dict @classmethod @@ -99,6 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "index_name": obj.get("index_name"), "index_type": obj.get("index_type"), "metric": obj.get("metric"), + "source_column": obj.get("source_column"), "status": obj.get("status"), "updated_at": obj.get("updated_at") }) diff --git a/pyproject.toml b/pyproject.toml index ff40c21..d8117d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hotdata" -version = "0.4.1" +version = "0.4.2" description = "Hotdata API" authors = [ {name = "Hotdata",email = "developers@hotdata.dev"}, diff --git a/test/test_index_entry_response.py b/test/test_index_entry_response.py index 988459b..c1677ce 100644 --- a/test/test_index_entry_response.py +++ b/test/test_index_entry_response.py @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> IndexEntryResponse: index_name = '', index_type = '', metric = '', + source_column = '', status = 'ready', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), connection_id = '', diff --git a/test/test_index_info_response.py b/test/test_index_info_response.py index 37ad4ab..b417a36 100644 --- a/test/test_index_info_response.py +++ b/test/test_index_info_response.py @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> IndexInfoResponse: index_name = '', index_type = '', metric = '', + source_column = '', status = 'ready', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) diff --git a/test/test_job_result.py b/test/test_job_result.py index 2afb627..6011d08 100644 --- a/test/test_job_result.py +++ b/test/test_job_result.py @@ -66,6 +66,7 @@ def make_instance(self, include_optional) -> JobResult: index_name = '', index_type = '', metric = '', + source_column = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/test/test_list_indexes_response.py b/test/test_list_indexes_response.py index 198a126..068adea 100644 --- a/test/test_list_indexes_response.py +++ b/test/test_list_indexes_response.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> ListIndexesResponse: index_name = '', index_type = '', metric = '', + source_column = '', status = 'ready', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ] @@ -60,6 +61,7 @@ def make_instance(self, include_optional) -> ListIndexesResponse: index_name = '', index_type = '', metric = '', + source_column = '', status = 'ready', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ],