@Override
  protected void getDdlForCreate(StringBuilder query) {
    defineColumns(query);

    // PARTITIONED BY. Used for parts of minor compaction.
    if (isPartitioned) {
      query.append(" PARTITIONED BY (`file_name` STRING) ");
    }

    // CLUSTERED BY. (bucketing)
    getMmBucketing(query);

    // SKEWED BY
    getSkewedByClause(query);

    // STORED AS / ROW FORMAT SERDE + INPUTFORMAT + OUTPUTFORMAT
    copySerdeFromSourceTable(query);

    // LOCATION
    if (location != null) {
      query.append(" LOCATION '").append(HiveStringUtils.escapeHiveCommand(location)).append("'");
    }

    // TBLPROPERTIES
    addTblProperties(query);
  }
Construct a CompactionQueryBuilderForInsertOnly with required params.

@param compactionType major or minor or rebalance, e.g. CompactionType.MAJOR.
                      Cannot be null.
                      Rebalance compaction is not supported for insert-only tables.
@throws IllegalArgumentException if compactionType is null or the compaction type is REBALANCE
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionQueryBuilderForInsertOnly.java