pyobvector 0.2.23__py3-none-any.whl → 0.2.24__py3-none-any.whl

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.
@@ -97,14 +97,20 @@ class ObVecClient(ObClient):
97
97
  )
98
98
  if sparse_vidxs is not None and len(sparse_vidxs) > 0:
99
99
  create_table_sql = str(CreateTable(table).compile(self.engine))
100
- new_sql = create_table_sql[: create_table_sql.rfind(")")]
100
+ # Preserve table options (e.g. ORGANIZATION=heap) after the closing ")"
101
+ last_paren = create_table_sql.rfind(")")
102
+ table_options_suffix = create_table_sql[
103
+ last_paren:
104
+ ] # e.g. ")ORGANIZATION=heap"
105
+ new_sql = create_table_sql[:last_paren]
101
106
  for sparse_vidx in sparse_vidxs:
102
107
  sparse_params = sparse_vidx._parse_kwargs()
103
108
  if "type" in sparse_params:
104
109
  new_sql += f",\n\tVECTOR INDEX {sparse_vidx.index_name}({sparse_vidx.field_name}) with (type={sparse_params['type']}, distance=inner_product)"
105
110
  else:
106
111
  new_sql += f",\n\tVECTOR INDEX {sparse_vidx.index_name}({sparse_vidx.field_name}) with (distance=inner_product)"
107
- new_sql += "\n)"
112
+ # Restore table options after the new closing ")"
113
+ new_sql += "\n)" + table_options_suffix[1:]
108
114
  conn.execute(text(new_sql))
109
115
  else:
110
116
  table.create(self.engine, checkfirst=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobvector
3
- Version: 0.2.23
3
+ Version: 0.2.24
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.23
37
+ pip install pyobvector==0.2.24
38
38
  ```
39
39
 
40
40
  ## Build Doc
@@ -8,7 +8,7 @@ pyobvector/client/hybrid_search.py,sha256=32ZA8lwVLCNGVHe_uEDQBaEQzrudw7zVl0KVXR
8
8
  pyobvector/client/index_param.py,sha256=dnXqI95MnwFrnAUSuwspb2GZ6y3VN6X4AYQdLAH6RDE,7125
9
9
  pyobvector/client/milvus_like_client.py,sha256=lXmQhMXXtb_9txU7r49Ujc-uR52EEMUHKKXoGtOtMRw,28078
10
10
  pyobvector/client/ob_client.py,sha256=KhcyOI_uR1Ejj-zhf6LWizglkaYMD-q_mOXOqIj0wVo,17048
11
- pyobvector/client/ob_vec_client.py,sha256=16fUGjiiFNyMpSvSP22kzAVuw_UqfZj4zdOnsXtEToc,20480
11
+ pyobvector/client/ob_vec_client.py,sha256=FgIdDV2RfJXUAKpFqaHRuK8r8LWRUv_ScKXJoI0tk4I,20860
12
12
  pyobvector/client/ob_vec_json_table_client.py,sha256=09Hyq865ja8sZ8Og-It4pXsU6gTrbbikKOhfKwTgU4A,41093
13
13
  pyobvector/client/partitions.py,sha256=iwYrewDH0-1QaHyqYUqFtn8gZnECvaRcP7vptDrtvAY,15940
14
14
  pyobvector/client/schema_type.py,sha256=I43WOXo5wDesXqq-GXokW10f-0n7WVxKY2qxXTmCMYA,1671
@@ -34,7 +34,7 @@ pyobvector/util/__init__.py,sha256=9vwVlbJVZt2PcQARInlnVCxfoFCvUnKit6RdNjUKJ44,3
34
34
  pyobvector/util/ob_version.py,sha256=UXWo2ZH9ONHkWSC3dlFzvvtYno9Nc7sK2cUXCAgiaO4,1520
35
35
  pyobvector/util/sparse_vector.py,sha256=5ibwd9Uy2zNVDrHxnq2tBSqxIV2uMe5zIauQhp-w0s0,1255
36
36
  pyobvector/util/vector.py,sha256=648vxhQHk7hP6C-k105V3a6yH-tHUnC7S7ooR38ubb0,2394
37
- pyobvector-0.2.23.dist-info/METADATA,sha256=WuqI2V-c2VjNp_ObtdJpPQymBWoOE4N9QX1giS9l_mo,14105
38
- pyobvector-0.2.23.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
39
- pyobvector-0.2.23.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
40
- pyobvector-0.2.23.dist-info/RECORD,,
37
+ pyobvector-0.2.24.dist-info/METADATA,sha256=xpwDOwznOTNphBORtU9gg2pKUouKVFWgm8PGqkBop0E,14105
38
+ pyobvector-0.2.24.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
39
+ pyobvector-0.2.24.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
40
+ pyobvector-0.2.24.dist-info/RECORD,,