@Override
  public String getParameterizedQueryString(DatabaseProduct databaseProduct) throws MetaException {
    if (limit > 0) {
      return sqlGenerator.addLimitClause(limit, noSelectQuery);
    } else {
      return "SELECT " + noSelectQuery;      
    }
 }
NEVER call this function without first calling heartbeat(long, long)
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/queries/GetLocksByLockId.java