2014-10-06 03:49:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-07-24 14:28:56 +00:00
|
|
|
#include <Storages/System/IStorageSystemOneBlock.h>
|
2014-10-06 03:49:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-12-08 02:49:04 +00:00
|
|
|
class Context;
|
|
|
|
|
|
|
|
|
2017-04-16 15:00:33 +00:00
|
|
|
/** Implements `zookeeper` system table, which allows you to view the data in ZooKeeper for debugging purposes.
|
2014-10-06 03:49:56 +00:00
|
|
|
*/
|
2023-04-06 12:24:22 +00:00
|
|
|
class StorageSystemZooKeeper final : public IStorage
|
2014-10-06 03:49:56 +00:00
|
|
|
{
|
|
|
|
public:
|
2022-06-02 05:41:37 +00:00
|
|
|
explicit StorageSystemZooKeeper(const StorageID & table_id_);
|
|
|
|
|
2014-10-06 03:49:56 +00:00
|
|
|
std::string getName() const override { return "SystemZooKeeper"; }
|
|
|
|
|
2018-07-24 14:28:56 +00:00
|
|
|
static NamesAndTypesList getNamesAndTypes();
|
2014-10-06 03:49:56 +00:00
|
|
|
|
2022-05-27 10:53:12 +00:00
|
|
|
SinkToStoragePtr write(const ASTPtr & /*query*/, const StorageMetadataPtr & /*metadata_snapshot*/, ContextPtr /*context*/) override;
|
|
|
|
|
2023-04-06 12:24:22 +00:00
|
|
|
void read(
|
|
|
|
QueryPlan & query_plan,
|
|
|
|
const Names & /*column_names*/,
|
|
|
|
const StorageSnapshotPtr & storage_snapshot,
|
|
|
|
SelectQueryInfo & query_info,
|
|
|
|
ContextPtr context,
|
|
|
|
QueryProcessingStage::Enum /*processed_stage*/,
|
|
|
|
size_t /*max_block_size*/,
|
|
|
|
size_t /*num_streams*/) override;
|
|
|
|
|
|
|
|
bool isSystemStorage() const override { return true; }
|
|
|
|
bool supportsIndexForIn() const override { return true; }
|
|
|
|
bool mayBenefitFromIndexForIn(const ASTPtr & node, ContextPtr, const StorageMetadataPtr &) const override;
|
2014-10-06 03:49:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|