Skip to content

fix: make default query row limit configurable - #154

Merged
FreeOnePlus merged 1 commit into
apache:masterfrom
FreeOnePlus:fix/issues-66-72-result-row-default
Jul 30, 2026
Merged

fix: make default query row limit configurable#154
FreeOnePlus merged 1 commit into
apache:masterfrom
FreeOnePlus:fix/issues-66-72-result-row-default

Conversation

@FreeOnePlus

Copy link
Copy Markdown
Member

Summary

  • add DEFAULT_RESULT_ROWS as the per-query default for exec_query
  • keep MAX_RESULT_ROWS as the independent deployment ceiling
  • expose the configured default consistently in the MCP tool schema and runtime handler
  • document the setting for environment and Docker Compose deployments

Root cause

MAX_RESULT_ROWS already controlled the maximum allowed request, but both the
tool schema and handler hardcoded an omitted max_rows argument to 100.
Increasing the deployment ceiling therefore did not change the default result
size.

User impact

Operators can now set, for example:

MAX_RESULT_ROWS=10000
DEFAULT_RESULT_ROWS=1000

Clients that omit exec_query.max_rows receive up to 1000 rows, while explicit
requests remain bounded by the 10000-row deployment ceiling.

Validation

  • uv run pytest -q: 1088 passed, 68 skipped; coverage 57.94%
  • real Doris HTTP and subprocess stdio suite: 9 passed, 2 optional monitoring tests skipped
  • real Doris regression verifies omitted max_rows uses DEFAULT_RESULT_ROWS
  • uv run ruff check .
  • uv run mypy doris_mcp_server
  • uv run bandit -r doris_mcp_server -c pyproject.toml
  • uv build
  • docker compose config --quiet

Fixes #66
Fixes #72

@FreeOnePlus
FreeOnePlus merged commit c10e9da into apache:master Jul 30, 2026
4 checks passed
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.

为什么执行查询时, MaxRows总是为100 如何配置查询时MaxRows限制

1 participant