Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
  • Loading branch information
windtalker committed Feb 1, 2023
1 parent 3b4da89 commit 82bc816
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dbms/src/Flash/Coprocessor/InterpreterUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ void orderStreams(

if (enable_fine_grained_shuffle)
{
size_t merge_sort_concurrency = enable_fine_grained_shuffle ? std::min(max_streams, pipeline.streams.size()) : 1;
pipeline.transform([&](auto & stream) {
stream = std::make_shared<MergeSortingBlockInputStream>(
stream,
order_descr,
settings.max_block_size,
limit,
getAverageThreshold(settings.max_bytes_before_external_sort, merge_sort_concurrency),
getAverageThreshold(settings.max_bytes_before_external_sort, std::min(max_streams, pipeline.streams.size())),
SpillConfig(context.getTemporaryPath(), fmt::format("{}_sort", log->identifier()), settings.max_spilled_size_per_spill, context.getFileProvider()),
log->identifier());
stream->setExtraInfo(String(enableFineGrainedShuffleExtraInfo));
Expand Down
2 changes: 0 additions & 2 deletions dbms/src/Interpreters/Aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,7 @@ bool Aggregator::executeOnBlock(
* It allows you to make, in the subsequent, an effective merge - either economical from memory or parallel.
*/
if (result.isConvertibleToTwoLevel() && worth_convert_to_two_level)
{
result.convertToTwoLevel();
}

/** Flush data to disk if too much RAM is consumed.
* Data can only be flushed to disk if a two-level aggregation is supported.
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Interpreters/Aggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ struct AggregatedDataVariants : private boost::noncopyable
case Type::NAME: \
{ \
const auto * ptr = reinterpret_cast<const AggregationMethodName(NAME) *>(aggregation_method_impl); \
return ptr->data.getBufferSizeInBytes(); \
bytes_count = ptr->data.getBufferSizeInBytes(); \
}

APPLY_FOR_AGGREGATED_VARIANTS(M)
Expand Down

0 comments on commit 82bc816

Please sign in to comment.