v.21.9Improvement

Add function_range_max_elements_in_block Setting for Data Volume Safety Threshold

Add a setting function_range_max_elements_in_block to tune the safety threshold for data volume generated by function range. This closes #26303. #26305 (alexey-milovidov).
Added a new setting function_range_max_elements_in_block to control the maximum number of elements generated by the range function within a single data block.

Why it matters

This setting addresses the issue of potentially excessive data volume produced by the range 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 the function_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.