#include #include #include #include #include #include #include #include #include #include #include #include using namespace DB; int main(int, char **) try { Block sample; { ColumnWithTypeAndName col; col.type = std::make_shared(); sample.insert(std::move(col)); } { ColumnWithTypeAndName col; col.type = std::make_shared(); sample.insert(std::move(col)); } ReadBufferFromFile in_buf("test_in"); WriteBufferFromFile out_buf("test_out"); FormatSettings format_settings; RowInputFormatParams params{DEFAULT_INSERT_BLOCK_SIZE, 0, 0, []{}}; InputFormatPtr input_format = std::make_shared(sample, in_buf, params, false, false, format_settings); BlockInputStreamPtr block_input = std::make_shared(std::move(input_format)); BlockOutputStreamPtr block_output = std::make_shared( std::make_shared(out_buf, sample, false, false, [](const Columns & /* columns */, size_t /* row */){}, format_settings)); copyData(*block_input, *block_output); return 0; } catch (...) { std::cerr << getCurrentExceptionMessage(true) << '\n'; return 1; }