mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
Remove unrelated changes
This commit is contained in:
parent
c129b31d7b
commit
f99f57aed8
@ -623,7 +623,6 @@ NamesAndTypesList Block::getNamesAndTypesList() const
|
|||||||
NamesAndTypes Block::getNamesAndTypes() const
|
NamesAndTypes Block::getNamesAndTypes() const
|
||||||
{
|
{
|
||||||
NamesAndTypes res;
|
NamesAndTypes res;
|
||||||
res.reserve(columns());
|
|
||||||
|
|
||||||
for (const auto & elem : data)
|
for (const auto & elem : data)
|
||||||
res.emplace_back(elem.name, elem.type);
|
res.emplace_back(elem.name, elem.type);
|
||||||
|
@ -418,7 +418,7 @@ void optimizeDuplicateDistinct(ASTSelectQuery & select)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
std::unordered_set<String> distinct_names = getDistinctNames(*subselect);
|
std::unordered_set<String> distinct_names = getDistinctNames(*subselect);
|
||||||
std::unordered_set<std::string_view> selected_names;
|
std::unordered_set<String> selected_names;
|
||||||
|
|
||||||
/// Check source column names from select list (ignore aliases and table names)
|
/// Check source column names from select list (ignore aliases and table names)
|
||||||
for (const auto & id : select.select()->children)
|
for (const auto & id : select.select()->children)
|
||||||
@ -427,11 +427,11 @@ void optimizeDuplicateDistinct(ASTSelectQuery & select)
|
|||||||
if (!identifier)
|
if (!identifier)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const String & name = identifier->shortName();
|
String name = identifier->shortName();
|
||||||
if (!distinct_names.contains(name))
|
if (!distinct_names.contains(name))
|
||||||
return; /// Not a distinct column, keep DISTINCT for it.
|
return; /// Not a distinct column, keep DISTINCT for it.
|
||||||
|
|
||||||
selected_names.emplace(name);
|
selected_names.insert(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// select columns list != distinct columns list
|
/// select columns list != distinct columns list
|
||||||
|
@ -117,10 +117,10 @@ struct InputOrderInfo
|
|||||||
* sort_description_for_merging will be equal to (c, d) and
|
* sort_description_for_merging will be equal to (c, d) and
|
||||||
* used_prefix_of_sorting_key_size will be equal to 4.
|
* used_prefix_of_sorting_key_size will be equal to 4.
|
||||||
*/
|
*/
|
||||||
const size_t used_prefix_of_sorting_key_size;
|
size_t used_prefix_of_sorting_key_size;
|
||||||
|
|
||||||
const int direction;
|
int direction;
|
||||||
const UInt64 limit;
|
UInt64 limit;
|
||||||
|
|
||||||
InputOrderInfo(
|
InputOrderInfo(
|
||||||
const SortDescription & sort_description_for_merging_,
|
const SortDescription & sort_description_for_merging_,
|
||||||
|
Loading…
Reference in New Issue
Block a user