diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 2cd3357e2..3b0b1fdac 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -f20747a9e1b158ea126960dcb30ac66f53435f2d \ No newline at end of file +d4c86c045ee9d0410a41ef07e8ae708673b95fa1 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index ac1055a9c..2de883356 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -5,6 +5,7 @@ ### New Features and Improvements ### Bug Fixes +* Fixed the deserialization of responses in VectorSearchAPI's `query_index()` method ([#961](https://github.com/databricks/databricks-sdk-py/pull/961)). ### Documentation diff --git a/databricks/sdk/service/vectorsearch.py b/databricks/sdk/service/vectorsearch.py index e40a64bf2..0f7e09d49 100755 --- a/databricks/sdk/service/vectorsearch.py +++ b/databricks/sdk/service/vectorsearch.py @@ -1165,7 +1165,7 @@ def from_dict(cls, d: Dict[str, Any]) -> QueryVectorIndexResponse: class ResultData: """Data returned in the query result.""" - data_array: Optional[List[ListValue]] = None + data_array: Optional[List[List[str]]] = None """Data rows returned in the query.""" row_count: Optional[int] = None @@ -1175,7 +1175,7 @@ def as_dict(self) -> dict: """Serializes the ResultData into a dictionary suitable for use as a JSON request body.""" body = {} if self.data_array: - body["data_array"] = [v.as_dict() for v in self.data_array] + body["data_array"] = [v for v in self.data_array] if self.row_count is not None: body["row_count"] = self.row_count return body @@ -1192,7 +1192,7 @@ def as_shallow_dict(self) -> dict: @classmethod def from_dict(cls, d: Dict[str, Any]) -> ResultData: """Deserializes the ResultData from a dictionary.""" - return cls(data_array=_repeated_dict(d, "data_array", ListValue), row_count=d.get("row_count", None)) + return cls(data_array=d.get("data_array", None), row_count=d.get("row_count", None)) @dataclass