Skip to content

Commit

Permalink
fix TestIntegrationEmbedded
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Feb 5, 2024
1 parent 6a4b72a commit 17896b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ func (ch *ClickHouse) getDisksFromSystemDisks(ctx context.Context) ([]Disk, erro
joinStoragePoliciesSQL := ""
if len(diskFields) > 0 && diskFields[0].StoragePolicyPresent > 0 {
storagePoliciesSQL = "groupUniqArray(s.policy_name)"
joinStoragePoliciesSQL = " INNER JOIN (SELECT policy_name, arrayJoin(disks) AS disk FROM system.storage_policies) AS s ON s.disk = d.name"
joinStoragePoliciesSQL = " INNER JOIN "
if ch.Config.UseEmbeddedBackupRestore {
joinStoragePoliciesSQL = " LEFT JOIN "
}
joinStoragePoliciesSQL += "(SELECT policy_name, arrayJoin(disks) AS disk FROM system.storage_policies) AS s ON s.disk = d.name"
}
var result []Disk
query := fmt.Sprintf(
Expand Down

0 comments on commit 17896b3

Please sign in to comment.