MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / isQueryWithSampling

Method isQueryWithSampling

src/Processors/QueryPlan/ReadFromMergeTree.cpp:3147–3157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3145}
3146
3147bool ReadFromMergeTree::isQueryWithSampling() const
3148{
3149 if (context->getSettingsRef()[Setting::parallel_replicas_count] > 1 && data.supportsSampling())
3150 return true;
3151
3152 if (query_info.table_expression_modifiers)
3153 return query_info.table_expression_modifiers->getSampleSizeRatio() != std::nullopt;
3154
3155 const auto & select = query_info.query->as<ASTSelectQuery &>();
3156 return select.sampleSize() != nullptr;
3157}
3158
3159Pipe ReadFromMergeTree::spreadMarkRanges(
3160 RangesInDataParts && parts_with_ranges,

Calls 3

getSampleSizeRatioMethod · 0.80
sampleSizeMethod · 0.80
supportsSamplingMethod · 0.45

Tested by

no test coverage detected