v.25.1Improvement

Make max_bytes_before_external_sort Limit Based on Total Query Memory Consumption and Introduce min_external_sort_block_bytes Setting

Make max_bytes_before_external_sort limit depends on total query memory consumption (previously it was number of bytes in the sorting block for one sorting thread, now it has the same meaning as max_bytes_before_external_group_by - it is total limit for the whole query memory for all threads). Also one more setting added to control on disk block size - min_external_sort_block_bytes. #72598 (Azat Khuzhin).