Removed unused should_reorder flag

This commit is contained in:
Alexander Gololobov 2022-06-13 12:06:28 +02:00
parent 5427d5c51b
commit aea5bc7527
2 changed files with 3 additions and 11 deletions

View File

@ -276,8 +276,8 @@ MergeTreeReadTaskColumns getReadTaskColumns(
Names pre_column_names; Names pre_column_names;
/// inject columns required for defaults evaluation /// inject columns required for defaults evaluation
bool should_reorder = !injectRequiredColumns( injectRequiredColumns(
storage, storage_snapshot, data_part, with_subcolumns, column_names).empty(); storage, storage_snapshot, data_part, with_subcolumns, column_names);
MergeTreeReadTaskColumns result; MergeTreeReadTaskColumns result;
auto options = GetColumnsOptions(GetColumnsOptions::All).withExtendedObjects(); auto options = GetColumnsOptions(GetColumnsOptions::All).withExtendedObjects();
@ -315,9 +315,6 @@ MergeTreeReadTaskColumns getReadTaskColumns(
const auto injected_pre_columns = injectRequiredColumns( const auto injected_pre_columns = injectRequiredColumns(
storage, storage_snapshot, data_part, with_subcolumns, all_pre_column_names); storage, storage_snapshot, data_part, with_subcolumns, all_pre_column_names);
if (!injected_pre_columns.empty())
should_reorder = true;
for (const auto & name : all_pre_column_names) for (const auto & name : all_pre_column_names)
{ {
if (pre_name_set.contains(name)) if (pre_name_set.contains(name))
@ -344,7 +341,6 @@ MergeTreeReadTaskColumns getReadTaskColumns(
/// 3. Rest of the requested columns /// 3. Rest of the requested columns
result.columns = storage_snapshot->getColumnsByNames(options, column_names); result.columns = storage_snapshot->getColumnsByNames(options, column_names);
result.should_reorder = should_reorder;
return result; return result;
} }

View File

@ -36,8 +36,6 @@ struct MergeTreeReadTaskColumns
NamesAndTypesList columns; NamesAndTypesList columns;
/// column names to read during each PREWHERE step /// column names to read during each PREWHERE step
std::vector<NamesAndTypesList> pre_columns; std::vector<NamesAndTypesList> pre_columns;
/// resulting block may require reordering in accordance with `ordered_names`
bool should_reorder = false;
std::string dump() const std::string dump() const
{ {
@ -73,8 +71,6 @@ struct MergeTreeReadTask
// const NamesAndTypesList & pre_columns; // const NamesAndTypesList & pre_columns;
/// should PREWHERE column be returned to requesting side? /// should PREWHERE column be returned to requesting side?
const bool remove_prewhere_column; const bool remove_prewhere_column;
// /// resulting block may require reordering in accordance with `ordered_names`
// const bool should_reorder;
/// Used to satistfy preferred_block_size_bytes limitation /// Used to satistfy preferred_block_size_bytes limitation
MergeTreeBlockSizePredictorPtr size_predictor; MergeTreeBlockSizePredictorPtr size_predictor;
/// Used to save current range processing status /// Used to save current range processing status