private static void createTable(Connection connection,
                                    String tableName,
                                    boolean external,
                                    SegmentSchema schema,
                                    SegmentMode mode,
                                    AggSchema aggSchema,
                                    String location,
                                    String partitionColumn) throws Exception {
        try (Statement statement = connection.createStatement()) {
            String createTableSql = HiveHelper.getHiveTableCreateSql(
                    tableName,
                    external,
                    schema,
                    mode,
                    aggSchema,
                    location,
                    partitionColumn);
            logger.debug("create table:\n{}", createTableSql);
            statement.execute(createTableSql);
        }
    }
A tool which move realtime data in rt folder into history partition.
Only support one partition column.
It only works on indexr tables which has a hive table with location pointed to the same path and with a table partition column.
indexr-server/src/main/java/io/indexr/server/rt2his/Rt2HisOnHive.java