mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-20 13:15:42 +00:00
30 lines
679 B
C++
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;
|
|
};
|
|
|
|
}
|