From 83556a5aa51c3286ffd78fe5772a9a59e284377f Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Mon, 27 Jul 2020 19:07:04 +0300 Subject: [PATCH] Minor thing. --- src/Interpreters/Aggregator.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/Aggregator.cpp b/src/Interpreters/Aggregator.cpp index ca3da54b2fc..170f2ff09ad 100644 --- a/src/Interpreters/Aggregator.cpp +++ b/src/Interpreters/Aggregator.cpp @@ -865,7 +865,17 @@ void Aggregator::writeToTemporaryFile(AggregatedDataVariants & data_variants, co void Aggregator::writeToTemporaryFile(AggregatedDataVariants & data_variants) { - return writeToTemporaryFile(data_variants, params.tmp_volume->getNextDisk()->getPath()); + String tmp_path; + auto volume_jbod = std::dynamic_pointer_cast(params.tmp_volume); + if (volume_jbod) + { + tmp_path = volume_jbod->getNextDisk()->getPath(); + } + else + { + tmp_path = params.tmp_volume->getDisk()->getPath(); + } + return writeToTemporaryFile(data_variants, tmp_path); }