pyobvector 0.2.21__tar.gz → 0.2.22__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {pyobvector-0.2.21 → pyobvector-0.2.22}/PKG-INFO +2 -2
  2. {pyobvector-0.2.21 → pyobvector-0.2.22}/README.md +1 -1
  3. {pyobvector-0.2.21 → pyobvector-0.2.22}/RELEASE_NOTES.md +5 -0
  4. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/hybrid_search.py +4 -0
  5. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/ob_vec_client.py +5 -2
  6. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyproject.toml +1 -1
  7. {pyobvector-0.2.21 → pyobvector-0.2.22}/.github/workflows/ci.yml +0 -0
  8. {pyobvector-0.2.21 → pyobvector-0.2.22}/.github/workflows/python-publish.yml +0 -0
  9. {pyobvector-0.2.21 → pyobvector-0.2.22}/.gitignore +0 -0
  10. {pyobvector-0.2.21 → pyobvector-0.2.22}/.pylintrc +0 -0
  11. {pyobvector-0.2.21 → pyobvector-0.2.22}/LICENSE +0 -0
  12. {pyobvector-0.2.21 → pyobvector-0.2.22}/Makefile +0 -0
  13. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/__init__.py +0 -0
  14. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/__init__.py +0 -0
  15. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/collection_schema.py +0 -0
  16. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/enum.py +0 -0
  17. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/exceptions.py +0 -0
  18. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/fts_index_param.py +0 -0
  19. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/index_param.py +0 -0
  20. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/milvus_like_client.py +0 -0
  21. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/ob_client.py +0 -0
  22. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/ob_vec_json_table_client.py +0 -0
  23. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/partitions.py +0 -0
  24. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/client/schema_type.py +0 -0
  25. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/json_table/__init__.py +0 -0
  26. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/json_table/json_value_returning_func.py +0 -0
  27. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/json_table/oceanbase_dialect.py +0 -0
  28. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/json_table/virtual_data_type.py +0 -0
  29. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/__init__.py +0 -0
  30. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/array.py +0 -0
  31. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/dialect.py +0 -0
  32. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/full_text_index.py +0 -0
  33. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/geo_srid_point.py +0 -0
  34. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/gis_func.py +0 -0
  35. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/match_against_func.py +0 -0
  36. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/ob_table.py +0 -0
  37. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/reflection.py +0 -0
  38. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/replace_stmt.py +0 -0
  39. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/sparse_vector.py +0 -0
  40. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/vec_dist_func.py +0 -0
  41. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/vector.py +0 -0
  42. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/schema/vector_index.py +0 -0
  43. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/util/__init__.py +0 -0
  44. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/util/ob_version.py +0 -0
  45. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/util/sparse_vector.py +0 -0
  46. {pyobvector-0.2.21 → pyobvector-0.2.22}/pyobvector/util/vector.py +0 -0
  47. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/conf.py +0 -0
  48. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/index.rst +0 -0
  49. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/modules.rst +0 -0
  50. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/pyobvector.client.rst +0 -0
  51. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/pyobvector.rst +0 -0
  52. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/pyobvector.schema.rst +0 -0
  53. {pyobvector-0.2.21 → pyobvector-0.2.22}/source/pyobvector.util.rst +0 -0
  54. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/__init__.py +0 -0
  55. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_fts_index.py +0 -0
  56. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_geometry.py +0 -0
  57. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_hybrid_search.py +0 -0
  58. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_json_table.py +0 -0
  59. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_milvus_like_client.py +0 -0
  60. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_milvus_like_client_sparse_vector.py +0 -0
  61. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_ob_vec_client.py +0 -0
  62. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_ob_vec_client_sparse_vector.py +0 -0
  63. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_ob_vec_more_algorithm.py +0 -0
  64. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_oceanbase_dialect.py +0 -0
  65. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_partition_compile.py +0 -0
  66. {pyobvector-0.2.21 → pyobvector-0.2.22}/tests/test_reflection.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobvector
3
- Version: 0.2.21
3
+ Version: 0.2.22
4
4
  Summary: A python SDK for OceanBase Vector Store, based on SQLAlchemy, compatible with Milvus API.
5
5
  Project-URL: Homepage, https://github.com/oceanbase/pyobvector
6
6
  Project-URL: Repository, https://github.com/oceanbase/pyobvector.git
@@ -34,7 +34,7 @@ uv sync
34
34
  - install with pip:
35
35
 
36
36
  ```shell
37
- pip install pyobvector==0.2.21
37
+ pip install pyobvector==0.2.22
38
38
  ```
39
39
 
40
40
  ## Build Doc
@@ -15,7 +15,7 @@ uv sync
15
15
  - install with pip:
16
16
 
17
17
  ```shell
18
- pip install pyobvector==0.2.21
18
+ pip install pyobvector==0.2.22
19
19
  ```
20
20
 
21
21
  ## Build Doc
@@ -2,6 +2,11 @@
2
2
 
3
3
  This file documents all released versions and their notable changes for the pyobvector project. Changes are grouped by version and categorized as Added (new features), Changed (modifications), Fixed (bug fixes), and Security (security updates).
4
4
 
5
+ ## [0.2.22](https://github.com/oceanbase/pyobvector/compare/release-v0.2.21...release-v0.2.22) - 2026-01-15
6
+
7
+ - Fix: HybridSearch.search() crashes when OceanBase returns NULL for empty results
8
+ - Feat: add **kwargs support to create_table_with_index_params for heap organization
9
+
5
10
  ## [0.2.21](https://github.com/oceanbase/pyobvector/compare/release-v0.2.20...release-v0.2.21) - 2026-01-13
6
11
 
7
12
  - Migrate tool.poetry section to project section following PEP 518
@@ -61,6 +61,8 @@ class HybridSearch(Client):
61
61
  with self.engine.connect() as conn:
62
62
  with conn.begin():
63
63
  res = conn.execute(sql, {"index": index, "body_str": body_str}).fetchone()
64
+ if res[0] is None:
65
+ return []
64
66
  return json.loads(res[0])
65
67
 
66
68
  def get_sql(
@@ -84,4 +86,6 @@ class HybridSearch(Client):
84
86
  with self.engine.connect() as conn:
85
87
  with conn.begin():
86
88
  res = conn.execute(sql, {"index": index, "body_str": body_str}).fetchone()
89
+ if res[0] is None:
90
+ return ""
87
91
  return res[0]
@@ -65,6 +65,7 @@ class ObVecClient(ObClient):
65
65
  vidxs: Optional[IndexParams] = None,
66
66
  fts_idxs: Optional[list[FtsIndexParam]] = None,
67
67
  partitions: Optional[ObPartition] = None,
68
+ **kwargs,
68
69
  ):
69
70
  """Create table with optional index_params.
70
71
 
@@ -75,8 +76,10 @@ class ObVecClient(ObClient):
75
76
  vidxs (Optional[IndexParams]): optional vector index schema
76
77
  fts_idxs (Optional[List[FtsIndexParam]]): optional full-text search index schema
77
78
  partitions (Optional[ObPartition]): optional partition strategy
79
+ **kwargs: additional keyword arguments (e.g., mysql_organization='heap')
78
80
  """
79
81
  sparse_vidxs = self._get_sparse_vector_index_params(vidxs)
82
+ kwargs.setdefault("extend_existing", True)
80
83
  with self.engine.connect() as conn:
81
84
  with conn.begin():
82
85
  # create table with common index
@@ -86,14 +89,14 @@ class ObVecClient(ObClient):
86
89
  self.metadata_obj,
87
90
  *columns,
88
91
  *indexes,
89
- extend_existing=True,
92
+ **kwargs,
90
93
  )
91
94
  else:
92
95
  table = ObTable(
93
96
  table_name,
94
97
  self.metadata_obj,
95
98
  *columns,
96
- extend_existing=True,
99
+ **kwargs,
97
100
  )
98
101
  if sparse_vidxs is not None and len(sparse_vidxs) > 0:
99
102
  create_table_sql = str(CreateTable(table).compile(self.engine))
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyobvector"
3
- version = "0.2.21"
3
+ version = "0.2.22"
4
4
  description = "A python SDK for OceanBase Vector Store, based on SQLAlchemy, compatible with Milvus API."
5
5
  authors = [{name="shanhaikang.shk",email="shanhaikang.shk@oceanbase.com"}]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes