mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
fix build
This commit is contained in:
parent
4c388e3d84
commit
ee9f85686b
@ -297,10 +297,6 @@ public:
|
|||||||
Map = 26,
|
Map = 26,
|
||||||
UUID = 27,
|
UUID = 27,
|
||||||
Object = 28,
|
Object = 28,
|
||||||
|
|
||||||
// Special types for index analysis
|
|
||||||
NegativeInfinity = 254,
|
|
||||||
PositiveInfinity = 255,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * toString(Which which)
|
static const char * toString(Which which)
|
||||||
|
@ -4515,7 +4515,37 @@ bool MergeTreeData::getQueryProcessingStageWithAggregateProjection(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Let's select the best projection to execute the query.
|
// Let's select the best projection to execute the query.
|
||||||
if (!candidates.empty() && !selected_candidate)src/Storages/StorageS3.cpp
|
if (!candidates.empty() && !selected_candidate)
|
||||||
|
{
|
||||||
|
std::shared_ptr<PartitionIdToMaxBlock> max_added_blocks;
|
||||||
|
if (settings.select_sequential_consistency)
|
||||||
|
{
|
||||||
|
if (const StorageReplicatedMergeTree * replicated = dynamic_cast<const StorageReplicatedMergeTree *>(this))
|
||||||
|
max_added_blocks = std::make_shared<PartitionIdToMaxBlock>(replicated->getMaxAddedBlocks());
|
||||||
|
}
|
||||||
|
|
||||||
|
auto parts = getDataPartsVector();
|
||||||
|
MergeTreeDataSelectExecutor reader(*this);
|
||||||
|
query_info.merge_tree_select_result_ptr = reader.estimateNumMarksToRead(
|
||||||
|
parts,
|
||||||
|
analysis_result.required_columns,
|
||||||
|
metadata_snapshot,
|
||||||
|
metadata_snapshot,
|
||||||
|
query_info,
|
||||||
|
query_context,
|
||||||
|
settings.max_threads,
|
||||||
|
max_added_blocks);
|
||||||
|
|
||||||
|
if (!query_info.merge_tree_select_result_ptr->error())
|
||||||
|
{
|
||||||
|
// Add 1 to base sum_marks so that we prefer projections even when they have equal number of marks to read.
|
||||||
|
// NOTE: It is not clear if we need it. E.g. projections do not support skip index for now.
|
||||||
|
min_sum_marks = query_info.merge_tree_select_result_ptr->marks() + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Favor aggregate projections
|
||||||
|
for (auto & candidate : candidates)
|
||||||
|
{
|
||||||
if (candidate.desc->type == ProjectionDescription::Type::Aggregate)
|
if (candidate.desc->type == ProjectionDescription::Type::Aggregate)
|
||||||
{
|
{
|
||||||
selectBestProjection(
|
selectBestProjection(
|
||||||
|
@ -77,7 +77,7 @@ StorageExecutable::StorageExecutable(
|
|||||||
|
|
||||||
Pipe StorageExecutable::read(
|
Pipe StorageExecutable::read(
|
||||||
const Names & /*column_names*/,
|
const Names & /*column_names*/,
|
||||||
const StorageMetadataPtr & metadata_snapshot,
|
const StorageSnapshotPtr & storage_snapshot,
|
||||||
SelectQueryInfo & /*query_info*/,
|
SelectQueryInfo & /*query_info*/,
|
||||||
ContextPtr context,
|
ContextPtr context,
|
||||||
QueryProcessingStage::Enum /*processed_stage*/,
|
QueryProcessingStage::Enum /*processed_stage*/,
|
||||||
@ -172,7 +172,7 @@ Pipe StorageExecutable::read(
|
|||||||
tasks.emplace_back(std::move(task));
|
tasks.emplace_back(std::move(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sample_block = metadata_snapshot->getSampleBlock();
|
auto sample_block = storage_snapshot->metadata->getSampleBlock();
|
||||||
|
|
||||||
ShellCommandSourceConfiguration configuration;
|
ShellCommandSourceConfiguration configuration;
|
||||||
configuration.max_block_size = max_block_size;
|
configuration.max_block_size = max_block_size;
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
Pipe read(
|
Pipe read(
|
||||||
const Names & column_names,
|
const Names & column_names,
|
||||||
const StorageMetadataPtr & /*metadata_snapshot*/,
|
const StorageSnapshotPtr & /*storage_snapshot*/,
|
||||||
SelectQueryInfo & query_info,
|
SelectQueryInfo & query_info,
|
||||||
ContextPtr context,
|
ContextPtr context,
|
||||||
QueryProcessingStage::Enum processed_stage,
|
QueryProcessingStage::Enum processed_stage,
|
||||||
|
Loading…
Reference in New Issue
Block a user