public <T> void appendCols(List<T> columns, String alias, String prefix, Function<T, String> stringConverter) {
    if (columns == null) {
      return;
    }

    String quotedAlias = null;
    if (isNotBlank(alias)) {
      quotedAlias = HiveUtils.unparseIdentifier(alias, this.conf);
    }

    boolean first = true;
    for (T fschema : columns) {
      if (first) {
        first = false;
      } else {
        queryStr.append(", ");
      }

      if (quotedAlias != null) {
        queryStr.append(quotedAlias).append('.');
      }
      queryStr.append(HiveUtils.unparseIdentifier(stringConverter.apply(fschema), this.conf));
      
      if (isNotBlank(prefix)) {
        queryStr.append(" AS ");
        String prefixedIdentifier = HiveUtils.unparseIdentifier(prefix + stringConverter.apply(fschema), this.conf);
        queryStr.append(prefixedIdentifier);
      }
    }
  }
Append list of partition columns to Insert statement. If user specified partition spec, then
use it to get/set the value for partition column else use dynamic partition mode with no value.
Static partition mode:
INSERT INTO T PARTITION(partCol1=val1,partCol2...) SELECT col1, ... partCol1,partCol2...
Dynamic partition mode:
INSERT INTO T PARTITION(partCol1,partCol2...) SELECT col1, ... partCol1,partCol2...
ql/src/java/org/apache/hadoop/hive/ql/parse/rewrite/sql/MultiInsertSqlGenerator.java