These settings are available in system.settings and are autogenerated from the ClickHouse snapshot.
max_size_to_preallocate_for_aggregation
For how many elements it is allowed to preallocate space in all hash tables in total before aggregation
max_size_to_preallocate_for_joins
For how many elements it is allowed to preallocate space in all hash tables in total before join