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
|
||||
{
|
||||
auto result_ptr = analyzed_result_ptr ? analyzed_result_ptr : selectRangesToRead();
|
||||
return *result_ptr;
|
||||
if (!analyzed_result_ptr)
|
||||
analyzed_result_ptr = selectRangesToRead();
|
||||
|
||||
return *analyzed_result_ptr;
|
||||
}
|
||||
|
||||
bool ReadFromMergeTree::isQueryWithSampling() const
|
||||
|
@ -261,7 +261,7 @@ private:
|
||||
|
||||
ReadFromMergeTree::AnalysisResult getAnalysisResult() const;
|
||||
|
||||
AnalysisResultPtr analyzed_result_ptr;
|
||||
mutable AnalysisResultPtr analyzed_result_ptr;
|
||||
VirtualFields shared_virtual_fields;
|
||||
|
||||
bool is_parallel_reading_from_replicas;
|
||||
|
Loading…
Reference in New Issue
Block a user