#pragma once #include #include #include #include #include namespace DB { /// To read the data that was flushed into the temporary data file. struct TemporaryFileStream { struct Stat { size_t compressed_bytes = 0; size_t uncompressed_bytes = 0; }; ReadBufferFromFile file_in; CompressedReadBuffer compressed_in; std::unique_ptr block_in; explicit TemporaryFileStream(const std::string & path); TemporaryFileStream(const std::string & path, const Block & header_); /// Flush data from input stream into file for future reading static Stat write(const std::string & path, const Block & header, QueryPipelineBuilder builder, const std::string & codec); }; }