Fixed tests

This commit is contained in:
Maksim Kita 2022-03-28 23:42:16 +02:00
parent 4e7d10297b
commit ea8ce3140a
3 changed files with 11 additions and 11 deletions

View File

@ -132,12 +132,10 @@ SortedBlocksWriter::TmpFilePtr SortedBlocksWriter::flush(const BlocksList & bloc
if (pipeline.getNumStreams() > 1)
{
auto transform = std::make_shared<MergingSortedTransform>(
pipeline.getHeader(),
pipeline.getNumStreams(),
sort_description,
false,
rows_in_block);
pipeline.addTransform(std::move(transform));
@ -192,7 +190,6 @@ SortedBlocksWriter::PremergedFiles SortedBlocksWriter::premerge()
pipeline.getHeader(),
pipeline.getNumStreams(),
sort_description,
false,
rows_in_block);
pipeline.addTransform(std::move(transform));
@ -225,7 +222,6 @@ SortedBlocksWriter::SortedFiles SortedBlocksWriter::finishMerge(std::function<vo
pipeline.getHeader(),
pipeline.getNumStreams(),
sort_description,
false,
rows_in_block);
pipeline.addTransform(std::move(transform));
@ -307,7 +303,6 @@ Block SortedBlocksBuffer::mergeBlocks(Blocks && blocks) const
builder.getHeader(),
builder.getNumStreams(),
sort_description,
false,
num_rows);
builder.addTransform(std::move(transform));

View File

@ -524,6 +524,9 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsWithOrder(
const auto & sorting_columns = metadata_for_reading->getSortingKey().column_names;
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)
sort_description.emplace_back(sorting_columns[j], input_order_info->direction);
@ -545,7 +548,6 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsWithOrder(
pipe.getHeader(),
pipe.numOutputPorts(),
sort_description,
settings.compile_sort_description,
max_block_size);
pipe.addTransform(std::move(transform));
@ -562,7 +564,6 @@ static void addMergingFinal(
const SortDescription & sort_description,
MergeTreeData::MergingParams merging_params,
Names partition_key_columns,
bool compile_sort_description,
size_t max_block_size)
{
const auto & header = pipe.getHeader();
@ -576,7 +577,7 @@ static void addMergingFinal(
{
case MergeTreeData::MergingParams::Ordinary:
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:
return std::make_shared<CollapsingSortedTransform>(header, num_outputs,
@ -765,6 +766,9 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsFinal(
Names sort_columns = metadata_for_reading->getSortingKeyColumns();
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();
sort_description.reserve(sort_columns_size);
@ -776,7 +780,7 @@ Pipe ReadFromMergeTree::spreadMarkRangesAmongStreamsFinal(
addMergingFinal(
pipe,
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));
}

View File

@ -3,9 +3,10 @@
<table_exists>hits_100m_single</table_exists>
</preconditions>
<!-- <settings>
<settings>
<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 TABLE jit_test_memory (