public ClickHouseDataProcessor getProcessor(ClickHouseDataConfig config, ClickHouseInputStream input,
            ClickHouseOutputStream output, Map<String, Serializable> settings, List<ClickHouseColumn> columns)
            throws IOException {
        ClickHouseFormat format = ClickHouseChecker.nonNull(config, ClickHouseDataConfig.TYPE_NAME).getFormat();
        ClickHouseDataProcessor processor = null;
        if (ClickHouseFormat.RowBinary == format ||
                ClickHouseFormat.RowBinaryWithNamesAndTypes == format ||
                ClickHouseFormat.RowBinaryWithDefaults == format ||
                ClickHouseFormat.RowBinaryWithNames == format) {
            processor = new ClickHouseRowBinaryProcessor(config, input, output, columns, settings);
        } else if (format.isBinary()) {
            // to let outer code access input stream
            processor = new ClickHouseBinaryFormatProcessor(config, input, output, columns, settings);
        } else if (format.isText()) {
            processor = new ClickHouseTabSeparatedProcessor(config, input, output, columns, settings);
        }
        return processor;
    }
Gets data processor according to given {@link ClickHouseDataConfig} and
settings.

@param config   non-null configuration containing information like
                {@link ClickHouseFormat}
@param input    input stream for deserialization, must not be null when
                {@code output} is null
@param output   output stream for serialization, must not be null when
                {@code input} is null
@param settings nullable settings
@param columns  nullable list of columns
@return data processor, which might be null
@throws IOException when failed to read columns from input stream
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseDataStreamFactory.java