2019-06-14 19:39:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
#include <Interpreters/Context_fwd.h>
|
2019-06-14 19:39:56 +00:00
|
|
|
#include <Parsers/IAST_fwd.h>
|
2021-10-02 07:13:14 +00:00
|
|
|
#include <base/types.h>
|
2019-06-14 19:39:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2020-12-13 11:30:53 +00:00
|
|
|
class NamesAndTypesList;
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2019-06-14 19:39:56 +00:00
|
|
|
/// It will produce an expression with CAST to get an AST with the required type.
|
|
|
|
ASTPtr addTypeConversionToAST(ASTPtr && ast, const String & type_name);
|
|
|
|
|
2020-12-12 16:42:15 +00:00
|
|
|
// If same type, then ignore the wrapper of CAST function
|
2021-06-01 12:20:52 +00:00
|
|
|
ASTPtr addTypeConversionToAST(ASTPtr && ast, const String & type_name, const NamesAndTypesList & all_columns, ContextPtr context);
|
2020-12-12 16:42:15 +00:00
|
|
|
|
2019-06-14 19:39:56 +00:00
|
|
|
}
|