public Query findDnByPattern(String rdn) {
    return Query.builder()
        .filter("(<rdn>)")
        .map("rdn", rdn)
        .limit(2)
        .build();
  }
Returns a query for finding user DN based on DN pattern.
<br>
Name of this method was derived from the original implementation of LDAP authentication.
This method should be replaced by {@link QueryFactory#findUserDnByRdn(java.lang.String).

@param rdn user RDN
@return an instance of {@link Query}
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ldap/QueryFactory.java