ENG-4625: changed based on paul's feedback.
Didn't change the algorithm to find the index for min/max in DDLCompiler
because we still want full key coverage index.