#include #include #include #include #include #include namespace DB { BinaryRowOutputStream::BinaryRowOutputStream(WriteBuffer & ostr_) : ostr(ostr_) { } void BinaryRowOutputStream::flush() { ostr.next(); } void BinaryRowOutputStream::writeField(const IColumn & column, const IDataType & type, size_t row_num) { type.serializeBinary(column, row_num, ostr); } void registerOutputFormatRowBinary(FormatFactory & factory) { factory.registerOutputFormat("RowBinary", []( WriteBuffer & buf, const Block & sample, const Context &, const FormatSettings &) { return std::make_shared( std::make_shared(buf), sample); }); } }