mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Fixed tests
This commit is contained in:
parent
4e7d10297b
commit
ea8ce3140a
@ -132,12 +132,10 @@ SortedBlocksWriter::TmpFilePtr SortedBlocksWriter::flush(const BlocksList & bloc
|
|||||||
|
|
||||||
if (pipeline.getNumStreams() > 1)
|
if (pipeline.getNumStreams() > 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto transform = std::make_shared<MergingSortedTransform>(
|
auto transform = std::make_shared<MergingSortedTransform>(
|
||||||
pipeline.getHeader(),
|
pipeline.getHeader(),
|
||||||
pipeline.getNumStreams(),
|
pipeline.getNumStreams(),
|
||||||
sort_description,
|
sort_description,
|
||||||
false,
|
|
||||||
rows_in_block);
|
rows_in_block);
|
||||||
|
|
||||||
pipeline.addTransform(std::move(transform));
|
pipeline.addTransform(std::move(transform));
|
||||||
@ -192,7 +190,6 @@ SortedBlocksWriter::PremergedFiles SortedBlocksWriter::premerge()
|
|||||||
pipeline.getHeader(),
|
pipeline.getHeader(),
|
||||||
pipeline.getNumStreams(),
|
pipeline.getNumStreams(),
|
||||||
sort_description,
|
sort_description,
|
||||||
false,
|
|
||||||
rows_in_block);
|
rows_in_block);
|
||||||
|
|
||||||
pipeline.addTransform(std::move(transform));
|
pipeline.addTransform(std::move(transform));
|
||||||
@ -225,7 +222,6 @@ SortedBlocksWriter::SortedFiles SortedBlocksWriter::finishMerge(std::function<vo
|
|||||||
pipeline.getHeader(),
|
pipeline.getHeader(),
|
||||||
pipeline.getNumStreams(),
|
pipeline.getNumStreams(),
|
||||||
sort_description,
|
sort_description,
|
||||||
false,
|
|
||||||
rows_in_block);
|
rows_in_block);
|
||||||
|
|
||||||
pipeline.addTransform(std::move(transform));
|
pipeline.addTransform(std::move(transform));
|
||||||
@ -307,7 +303,6 @@ Block SortedBlocksBuffer::mergeBlocks(Blocks && blocks) const
|
|||||||
builder.getHeader(),
|
builder.getHeader(),
|
||||||
builder.getNumStreams(),
|
builder.getNumStreams(),
|
||||||
sort_description,
|
sort_description,
|
||||||
false,
|
|
||||||
num_rows);
|
num_rows);
|
||||||
|
|
||||||
builder.addTransform(std::move(transform));
|
builder.addTransform(std::move(transform));
|
||||||
|
@ -524,6 +524,9 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsWithOrder(
|
|||||||
const auto & sorting_columns = metadata_for_reading->getSortingKey().column_names;
|
const auto & sorting_columns = metadata_for_reading->getSortingKey().column_names;
|
||||||
|
|
||||||
SortDescription sort_description;
|
SortDescription sort_description;
|
||||||
|
sort_description.compile_sort_description = settings.compile_sort_description;
|
||||||
|
sort_description.min_count_to_compile_sort_description = settings.min_count_to_compile_sort_description;
|
||||||
|
|
||||||
for (size_t j = 0; j < prefix_size; ++j)
|
for (size_t j = 0; j < prefix_size; ++j)
|
||||||
sort_description.emplace_back(sorting_columns[j], input_order_info->direction);
|
sort_description.emplace_back(sorting_columns[j], input_order_info->direction);
|
||||||
|
|
||||||
@ -545,7 +548,6 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsWithOrder(
|
|||||||
pipe.getHeader(),
|
pipe.getHeader(),
|
||||||
pipe.numOutputPorts(),
|
pipe.numOutputPorts(),
|
||||||
sort_description,
|
sort_description,
|
||||||
settings.compile_sort_description,
|
|
||||||
max_block_size);
|
max_block_size);
|
||||||
|
|
||||||
pipe.addTransform(std::move(transform));
|
pipe.addTransform(std::move(transform));
|
||||||
@ -562,7 +564,6 @@ static void addMergingFinal(
|
|||||||
const SortDescription & sort_description,
|
const SortDescription & sort_description,
|
||||||
MergeTreeData::MergingParams merging_params,
|
MergeTreeData::MergingParams merging_params,
|
||||||
Names partition_key_columns,
|
Names partition_key_columns,
|
||||||
bool compile_sort_description,
|
|
||||||
size_t max_block_size)
|
size_t max_block_size)
|
||||||
{
|
{
|
||||||
const auto & header = pipe.getHeader();
|
const auto & header = pipe.getHeader();
|
||||||
@ -576,7 +577,7 @@ static void addMergingFinal(
|
|||||||
{
|
{
|
||||||
case MergeTreeData::MergingParams::Ordinary:
|
case MergeTreeData::MergingParams::Ordinary:
|
||||||
return std::make_shared<MergingSortedTransform>(header, num_outputs,
|
return std::make_shared<MergingSortedTransform>(header, num_outputs,
|
||||||
sort_description, compile_sort_description, max_block_size);
|
sort_description, max_block_size);
|
||||||
|
|
||||||
case MergeTreeData::MergingParams::Collapsing:
|
case MergeTreeData::MergingParams::Collapsing:
|
||||||
return std::make_shared<CollapsingSortedTransform>(header, num_outputs,
|
return std::make_shared<CollapsingSortedTransform>(header, num_outputs,
|
||||||
@ -765,6 +766,9 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsFinal(
|
|||||||
|
|
||||||
Names sort_columns = metadata_for_reading->getSortingKeyColumns();
|
Names sort_columns = metadata_for_reading->getSortingKeyColumns();
|
||||||
SortDescription sort_description;
|
SortDescription sort_description;
|
||||||
|
sort_description.compile_sort_description = settings.compile_sort_description;
|
||||||
|
sort_description.min_count_to_compile_sort_description = settings.min_count_to_compile_sort_description;
|
||||||
|
|
||||||
size_t sort_columns_size = sort_columns.size();
|
size_t sort_columns_size = sort_columns.size();
|
||||||
sort_description.reserve(sort_columns_size);
|
sort_description.reserve(sort_columns_size);
|
||||||
|
|
||||||
@ -776,7 +780,7 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsFinal(
|
|||||||
addMergingFinal(
|
addMergingFinal(
|
||||||
pipe,
|
pipe,
|
||||||
std::min<size_t>(num_streams, settings.max_final_threads),
|
std::min<size_t>(num_streams, settings.max_final_threads),
|
||||||
sort_description, data.merging_params, partition_key_columns, settings.compile_sort_description, max_block_size);
|
sort_description, data.merging_params, partition_key_columns, max_block_size);
|
||||||
|
|
||||||
partition_pipes.emplace_back(std::move(pipe));
|
partition_pipes.emplace_back(std::move(pipe));
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
<table_exists>hits_100m_single</table_exists>
|
<table_exists>hits_100m_single</table_exists>
|
||||||
</preconditions>
|
</preconditions>
|
||||||
|
|
||||||
<!-- <settings>
|
<settings>
|
||||||
<compile_sort_description>1</compile_sort_description>
|
<compile_sort_description>1</compile_sort_description>
|
||||||
</settings> -->
|
<min_count_to_compile_sort_description>0</min_count_to_compile_sort_description>
|
||||||
|
</settings>
|
||||||
|
|
||||||
<create_query>
|
<create_query>
|
||||||
CREATE TABLE jit_test_memory (
|
CREATE TABLE jit_test_memory (
|
||||||
|
Loading…
Reference in New Issue
Block a user