ClickHouse/src/Storages/getStructureOfRemoteTable.h

29 lines
732 B
C++
Raw Normal View History

#pragma once
#include <Storages/ColumnsDescription.h>
#include <Parsers/IAST.h>
2018-07-25 12:53:38 +00:00
#include <Parsers/queryToString.h>
#include <Interpreters/Cluster.h>
namespace DB
{
class Context;
2020-03-06 20:38:19 +00:00
struct StorageID;
2017-04-16 15:00:33 +00:00
/// Find the names and types of the table columns on any server in the cluster.
/// Used to implement the `remote` table function and others.
ColumnsDescription getStructureOfRemoteTable(
const Cluster & cluster,
2020-03-06 20:38:19 +00:00
const StorageID & table_id,
const Context & context,
const ASTPtr & table_func_ptr = nullptr);
ColumnsDescription getStructureOfRemoteTableInShard(
const Cluster::ShardInfo & shard_info,
2020-03-31 01:14:32 +00:00
const StorageID & table_id,
const Context & context,
const ASTPtr & table_func_ptr = nullptr);
}