Skip to content

Commit

Permalink
show stmt str
Browse files Browse the repository at this point in the history
Signed-off-by: shanhaikang.shk <[email protected]>
  • Loading branch information
GITHUBear committed Nov 11, 2024
1 parent 783dd64 commit efb46dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyobvector/client/ob_vec_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ def post_ann_search(
extra_output_cols: Optional[List] = None,
where_clause=None,
partition_names: Optional[List[str]] = None,
str_list: Optional[List[str]] = None,
):
"""perform post ann search.
Expand Down Expand Up @@ -659,11 +660,17 @@ def post_ann_search(
with self.engine.connect() as conn:
with conn.begin():
if partition_names is None:
if str_list is not None:
str_list.append(
str(stmt.compile(compile_kwargs={"literal_binds": True}))
)
return conn.execute(stmt)
stmt_str = str(stmt.compile(compile_kwargs={"literal_binds": True}))
stmt_str = self._insert_partition_hint_for_query_sql(
stmt_str, f"PARTITION({', '.join(partition_names)})"
)
if str_list is not None:
str_list.append(stmt_str)
return conn.execute(text(stmt_str))

def precise_search(
Expand Down

0 comments on commit efb46dc

Please sign in to comment.