| 1724 | } |
| 1725 | |
| 1726 | String ClusterCopier::getRemoteCreateTable(const DatabaseAndTableName & table, Connection & connection, const Settings & settings) |
| 1727 | { |
| 1728 | auto remote_context = Context::createCopy(context); |
| 1729 | remote_context->setSettings(settings); |
| 1730 | |
| 1731 | String query = "SHOW CREATE TABLE " + getQuotedTable(table); |
| 1732 | Block block = getBlockWithAllStreamData(std::make_shared<RemoteBlockInputStream>( |
| 1733 | connection, query, InterpreterShowCreateQuery::getSampleBlock(), remote_context)); |
| 1734 | |
| 1735 | return typeid_cast<const ColumnString &>(*block.safeGetByPosition(0).column).getDataAt(0).toString(); |
| 1736 | } |
| 1737 | |
| 1738 | |
| 1739 | ASTPtr ClusterCopier::getCreateTableForPullShard(const ConnectionTimeouts & timeouts, TaskShard & task_shard) |
nothing calls this directly
no test coverage detected