mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Update copier to use group by to find partitions (#47386)
This commit is contained in:
parent
113c98edb9
commit
b0931c8967
@ -1867,8 +1867,8 @@ std::set<String> ClusterCopier::getShardPartitions(const ConnectionTimeouts & ti
|
||||
String query;
|
||||
{
|
||||
WriteBufferFromOwnString wb;
|
||||
wb << "SELECT DISTINCT " << partition_name << " AS partition FROM"
|
||||
<< " " << getQuotedTable(task_shard.table_read_shard) << " ORDER BY partition DESC";
|
||||
wb << "SELECT " << partition_name << " AS partition FROM "
|
||||
<< getQuotedTable(task_shard.table_read_shard) << " GROUP BY partition ORDER BY partition DESC";
|
||||
query = wb.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user