protected List<String> getColumnDescs() {
    List<FieldSchema> cols = sourceTab.getSd().getCols();
    List<String> columnDescs = new ArrayList<>();
    for (FieldSchema col : cols) {
      String columnType = DDLPlanUtils.formatType(TypeInfoUtils.getTypeInfoFromTypeString(col.getType()));
      String columnDesc = "`" + col.getName() + "` " + (!insertOnly ? ":" : "") + columnType;
      columnDescs.add(columnDesc);
    }
    return columnDescs;
  }
Define columns of the create query.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionQueryBuilder.java