njnu-seafish opened a new issue, #18702: URL: https://github.com/apache/dolphinscheduler/issues/18702
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description ### What happened 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: ```java // 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? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
