private void writeTxnRange(StringBuilder builder, long txnMin, long txnMax) {
    if (txnMax >= 0) {
      if (builder.length() > 0) {
        builder.append(',');
      }
      if (txnMin == txnMax) {
        builder.append(txnMin);
      } else if (txnMin + MIN_RANGE_LENGTH - 1 > txnMax) {
        // If the range is small the overhead is not worth it
        for (long txn = txnMin; txn <= txnMax; txn++) {
          builder.append(txn);
          if (txn != txnMax) {
            builder.append(',');
          }
        }
      } else {
        builder.append(txnMin).append('-').append(txnMax);
      }
    }
  }
txnlist is represented in ranges like this: 10-20,14,16-50
if the range is smaller then 5 it will not get merged, to avoid unnecessary overhead
storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java