private Object[] prepareParams(String catName, String dbName, String tableName,
      List<String> partNames, List<String> colNames, String engine) throws MetaException {
    Object[] params = new Object[colNames.size() + partNames.size() + 4];
    int paramI = 0;
    params[paramI++] = catName;
    params[paramI++] = dbName;
    params[paramI++] = tableName;
    for (String colName : colNames) {
      params[paramI++] = colName;
    }
    for (String partName : partNames) {
      params[paramI++] = partName;
    }
    params[paramI++] = engine;

    return params;
  }
Should be called with the list short enough to not trip up Oracle/etc.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java