ClickHouse/src/Storages/getStructureOfRemoteTable.h

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

34 lines
883 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,
ContextPtr context,
const ASTPtr & table_func_ptr = nullptr);
using ColumnsDescriptionByShardNum = std::unordered_map<UInt32, ColumnsDescription>;
2022-03-01 16:32:55 +00:00
/// Returns descriptions of columns of type Object for each shard.
ColumnsDescriptionByShardNum getExtendedObjectsOfRemoteTables(
const Cluster & cluster,
const StorageID & remote_table_id,
const ColumnsDescription & storage_columns,
ContextPtr context);
}