ClickHouse/src/Formats/TemporaryFileStreamLegacy.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
970 B
C++
Raw Normal View History

2019-10-01 18:51:33 +00:00
#pragma once
2021-07-22 16:05:52 +00:00
#include <Processors/ISource.h>
2021-10-16 14:03:50 +00:00
#include <QueryPipeline/QueryPipelineBuilder.h>
2019-10-01 18:51:33 +00:00
#include <Compression/CompressedReadBuffer.h>
#include <IO/ReadBufferFromFile.h>
2021-10-15 20:18:20 +00:00
#include <Formats/NativeReader.h>
2019-10-01 18:51:33 +00:00
namespace DB
{
2022-09-21 12:51:46 +00:00
/// Used only in MergeJoin
/// TODO: use `TemporaryDataOnDisk` instead
2019-10-01 18:51:33 +00:00
/// To read the data that was flushed into the temporary data file.
struct TemporaryFileStreamLegacy
2019-10-01 18:51:33 +00:00
{
2022-08-15 18:04:25 +00:00
struct Stat
{
size_t compressed_bytes = 0;
size_t uncompressed_bytes = 0;
2022-08-15 18:04:25 +00:00
};
2019-10-01 18:51:33 +00:00
ReadBufferFromFile file_in;
CompressedReadBuffer compressed_in;
2021-10-08 17:21:19 +00:00
std::unique_ptr<NativeReader> block_in;
2019-10-01 18:51:33 +00:00
explicit TemporaryFileStreamLegacy(const std::string & path);
TemporaryFileStreamLegacy(const std::string & path, const Block & header_);
/// Flush data from input stream into file for future reading
2022-08-15 18:04:25 +00:00
static Stat write(const std::string & path, const Block & header, QueryPipelineBuilder builder, const std::string & codec);
};
2019-10-01 18:51:33 +00:00
}