v.21.9Improvement
Add function_range_max_elements_in_block Setting for Data Volume Safety Threshold
Add a settingfunction_range_max_elements_in_blockto tune the safety threshold for data volume generated by functionrange. This closes #26303. #26305 (alexey-milovidov).
Why it matters
This setting addresses the issue of potentially excessive data volume produced by therange function, which could impact performance or system stability. It provides a safety threshold that helps users prevent unintentional creation of very large datasets when using range, thereby improving resource management and query efficiency.How to use it
Users can enable and tune this feature by setting thefunction_range_max_elements_in_block parameter to the desired maximum number of elements allowed per block for the range function. This can be set in the server configuration or per session, depending on the use case.