| 143 | } |
| 144 | |
| 145 | ASTPtr TableFunctionNode::toASTImpl(const ConvertToASTOptions & options) const |
| 146 | { |
| 147 | auto table_function_ast = make_intrusive<ASTFunction>(); |
| 148 | |
| 149 | table_function_ast->name = table_function_name; |
| 150 | |
| 151 | const auto & arguments = getArguments(); |
| 152 | table_function_ast->children.push_back(arguments.toAST(options)); |
| 153 | table_function_ast->arguments = table_function_ast->children.back(); |
| 154 | |
| 155 | if (!settings_changes.empty()) |
| 156 | { |
| 157 | auto settings_ast = make_intrusive<ASTSetQuery>(); |
| 158 | settings_ast->changes = settings_changes; |
| 159 | settings_ast->is_standalone = false; |
| 160 | table_function_ast->arguments->children.push_back(std::move(settings_ast)); |
| 161 | } |
| 162 | |
| 163 | return table_function_ast; |
| 164 | } |
| 165 | |
| 166 | } |