code: public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges)
      {
          HashRangeExpression predicate = new HashRangeExpression();
          predicate.setRanges(ranges);
          predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex());
  
          return predicate;
      }
docs: Create the expression used to build elastic index for a given table.
  @param table     The table to build the elastic index on
  @param ranges    The hash ranges that the index should include