Skip to content

feat(adbpg): add ADBPG generic search configuration - #832

Open
swhhy wants to merge 1 commit into
zilliztech:mainfrom
swhhy:main
Open

feat(adbpg): add ADBPG generic search configuration#832
swhhy wants to merge 1 commit into
zilliztech:mainfrom
swhhy:main

Conversation

@swhhy

@swhhy swhhy commented Aug 3, 2026

Copy link
Copy Markdown

This PR adds generic search configuration support for the ADBPG client. Many thanks to the maintainers for taking the time to review and merge this contribution. Your feedback and support are greatly appreciated.

@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: swhhy
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@swhhy

swhhy commented Aug 3, 2026

Copy link
Copy Markdown
Author

/assign @XuanYang-cn


def _render_setup_sql(self, statement: str) -> str:
"""Resolve stable benchmark placeholders in explicitly injected SQL."""
return Template(statement).safe_substitute(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium ---- string.Template treats $$ as an escape and collapses it to a single $. That breaks a common PostgreSQL setup statement such as DO $$ BEGIN ... END $$; before it reaches the server, even though --setup-sql is advertised as accepting SQL. The regression test only covers a named dollar tag ($body$), which safe_substitute happens to leave alone. Please preserve ordinary PostgreSQL dollar-quoted bodies while replacing only the three documented placeholders, and add a DO $$...$$ case.


class AdbpgIndexConfig(BaseModel, DBCaseConfig):
metric_type: MetricType | None = None
benchmark_topk: int = 100

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium ---- This duplicates the benchmark k with an independent default, but only the direct CLI path copies parameters["k"] into it. Batch/UI/REST tasks keep the real value in TaskConfig.case_config.k, so a run configured with (for example) k=10 still expands $topk to 100 unless the user knows to set this internal field separately. That silently tunes the index/setup SQL for a different workload. Please propagate CaseConfig.k to the ADBPG client for every entry point (or pass it as a normal client argument) instead of maintaining a second default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants