mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Merge pull request #64579 from ClickHouse/store-analysis-result
Cache first analysis result in ReadFromMergeTree
This commit is contained in:
commit
22d50dcd3e
@ -1811,8 +1811,10 @@ bool ReadFromMergeTree::requestOutputEachPartitionThroughSeparatePort()
|
|||||||
|
|
||||||
ReadFromMergeTree::AnalysisResult ReadFromMergeTree::getAnalysisResult() const
|
ReadFromMergeTree::AnalysisResult ReadFromMergeTree::getAnalysisResult() const
|
||||||
{
|
{
|
||||||
auto result_ptr = analyzed_result_ptr ? analyzed_result_ptr : selectRangesToRead();
|
if (!analyzed_result_ptr)
|
||||||
return *result_ptr;
|
analyzed_result_ptr = selectRangesToRead();
|
||||||
|
|
||||||
|
return *analyzed_result_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReadFromMergeTree::isQueryWithSampling() const
|
bool ReadFromMergeTree::isQueryWithSampling() const
|
||||||
|
@ -261,7 +261,7 @@ private:
|
|||||||
|
|
||||||
ReadFromMergeTree::AnalysisResult getAnalysisResult() const;
|
ReadFromMergeTree::AnalysisResult getAnalysisResult() const;
|
||||||
|
|
||||||
AnalysisResultPtr analyzed_result_ptr;
|
mutable AnalysisResultPtr analyzed_result_ptr;
|
||||||
VirtualFields shared_virtual_fields;
|
VirtualFields shared_virtual_fields;
|
||||||
|
|
||||||
bool is_parallel_reading_from_replicas;
|
bool is_parallel_reading_from_replicas;
|
||||||
|
Loading…
Reference in New Issue
Block a user