public void appendPartitionCols(Table table) {
    // If the table is partitioned we have to put the partition() clause in
    List<FieldSchema> partCols = table.getPartCols();
    if (partCols == null || partCols.isEmpty()) {
      return;
    }
    queryStr.append(" partition (");
    appendCols(partCols, FieldSchema::getName);
    queryStr.append(")");
  }
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