static Set<IndexHint> validate(Set<IndexHint> indexHints) {
    boolean hasUse = false;
    boolean hasForce = false;
    for (IndexHint indexHint : indexHints) {
      hasUse = hasUse || indexHint.getType() == IndexHint.Type.USE;
      hasForce = hasForce || indexHint.getType() == IndexHint.Type.FORCE;
    }
    if (hasUse && hasForce) {
      throw new InvalidIndexHintException("USE INDEX and FORCE INDEX cannot be mixed for the same table");
    }
    return indexHints;
  }