public Map<String, String> getTableColumnsToType(Table tbl) {
    List<FieldSchema> fieldSchemas = tbl.getAllCols();
    Map<String, String> ret = new HashMap<String, String>();
    fieldSchemas.stream().forEach(f -> ret.put(f.getName(), f.getType()));
    return ret;
  }
Returns the create database query for a give database name.

@param dbNames
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java