ClickHouse/src/Processors/Transforms/StreamInQueryCacheTransform.h
2023-05-05 16:28:51 +00:00

30 lines
679 B
C++

#pragma once
#include <Processors/ISimpleTransform.h>
#include <Interpreters/Cache/QueryCache.h>
namespace DB
{
class StreamInQueryCacheTransform : public ISimpleTransform
{
public:
StreamInQueryCacheTransform(
const Block & header_,
std::shared_ptr<QueryCache::Writer> query_cache_writer,
QueryCache::Writer::ChunkType chunk_type);
protected:
void transform(Chunk & chunk) override;
public:
void finalizeWriteInQueryCache();
String getName() const override { return "StreamInQueryCacheTransform"; }
private:
const std::shared_ptr<QueryCache::Writer> query_cache_writer;
const QueryCache::Writer::ChunkType chunk_type;
};
}