aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Interpreters/replaceAliasColumnsInQuery.h
blob: 3c072c1300b5f0619d4676abcf6d0735b75098ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <Core/Names.h>
#include <Interpreters/Context_fwd.h>
#include <Parsers/IAST_fwd.h>
#include <base/types.h>

namespace DB
{

class ColumnsDescription;

/// Replace storage alias columns in select query if possible. Return true if the query is changed.
bool replaceAliasColumnsInQuery(
        ASTPtr & ast,
        const ColumnsDescription & columns,
        const NameToNameMap & array_join_result_to_source,
        ContextPtr context,
        const std::unordered_set<IAST *> & excluded_nodes = {});

}