v.22.1Bug Fix

Fix optimize_read_in_order for Distributed and Merge table engines with monotonous sorting keys

Fix optimize_read_in_order optimization in case when table engine is Distributed or Merge and its underlying MergeTree tables have monotonous function in prefix of sorting key. #32670 (Anton Popov).