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;
/// inject columns required for defaults evaluation
bool should_reorder = !injectRequiredColumns(
storage, storage_snapshot, data_part, with_subcolumns, column_names).empty();
injectRequiredColumns(
storage, storage_snapshot, data_part, with_subcolumns, column_names);
MergeTreeReadTaskColumns result;
auto options = GetColumnsOptions(GetColumnsOptions::All).withExtendedObjects();
@ -315,9 +315,6 @@ MergeTreeReadTaskColumns getReadTaskColumns(
const auto injected_pre_columns = injectRequiredColumns(
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)
{
if (pre_name_set.contains(name))
@ -342,9 +339,8 @@ MergeTreeReadTaskColumns getReadTaskColumns(
result.pre_columns.push_back(storage_snapshot->getColumnsByNames(options, pre_column_names));
//////////////
/// 3. Rest of the requested columns
/// 3. Rest of the requested columns
result.columns = storage_snapshot->getColumnsByNames(options, column_names);
result.should_reorder = should_reorder;
return result;
}

View File

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