public static <T> String getIdListForIn(Collection<T> objectIds) throws MetaException {
    return objectIds.stream()
               .map(i -> i.toString())
               .collect(Collectors.joining(","));
  }
This method returns a comma separated string consisting of String values of a given list.
This is used for preparing "SOMETHING_ID in (...)" to use in SQL queries.
@param objectIds the objectId collection
@return The concatenated list
@throws MetaException If the list contains wrong data
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java