Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Improvement][Worker-SqlTask] Make the default query row limit (QUERY_LIMIT = 10000) configurable

Open
#18,702 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@njnu-seafish is already working on this.

Since Oct 13, 2026.

  • #18705 by @njnu-seafish — open

Assessment

This issue has not been assessed yet.

Description

backend improvement UI
Search before asking
  • I had searched in the issues and found no similar feature requirement.
Description

The SQL task caps the number of rows fetched by the worker via Statement.setMaxRows. When the
task-level limit parameter is not set (limit <= 0), it falls back to a hard-coded constant:

// dolphinscheduler-task-plugin/dolphinscheduler-task-sql/.../SqlTask.java
private static final int QUERY_LIMIT = 10000;

stmt.setMaxRows(sqlParameters.getLimit() <= 0 ? QUERY_LIMIT : sqlParameters.getLimit());

The setMaxRows protection was introduced specifically to prevent worker OOM when querying large tables, and the default of 10000 was chosen as the fallback when the task-level limit is unset. However, this fallback default itself cannot be adjusted at deployment time: an administrator who wants a smaller (or larger) global default has to modify the source and rebuild, since there is no entry in common.properties for it.

10000 rows is not a one-size-fits-all default:

For wide rows (many columns / large values), 10000 rows can still consume a significant amount of worker heap, so memory-constrained workers may need a much smaller default.
Conversely, deployments with generous worker resources and legitimate large-result use cases have to set limit on every single task definition, which is a per-task burden for what is really a deployment-level concern.

Are you willing to submit a PR?
  • Yes I am willing to submit a PR!
Code of Conduct
Dominant language
Java
Stars
14.5k
Forks
5.1k
Avg merge
2d 10h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/dolphinscheduler

All issues in apache/dolphinscheduler

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.