Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed Apr 25, 2024
1 parent 33f6ed9 commit 15ff512
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 166 deletions.
25 changes: 13 additions & 12 deletions dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,14 @@ void DAGExpressionAnalyzer::buildCommonAggFunc(
context);
}

std::pair<String, DataTypePtr> findFirstRow(const AggregateDescriptions & aggregate_descriptions, const String & arg_name)
std::pair<String, DataTypePtr> findFirstRow(
const AggregateDescriptions & aggregate_descriptions,
const String & arg_name)
{
for (const auto & desc : aggregate_descriptions)
{
if (desc.function->getName() == "first_row" &&
desc.argument_names.size() == 1 &&
desc.argument_names[0] == arg_name)
if (desc.function->getName() == "first_row" && desc.argument_names.size() == 1
&& desc.argument_names[0] == arg_name)
return std::make_pair(desc.column_name, desc.function->getReturnType());
}
return std::make_pair("", nullptr);
Expand Down Expand Up @@ -619,14 +620,14 @@ void DAGExpressionAnalyzer::buildAggGroupBy(
/// extra aggregation function any(group_by_column) here as the output of the group by column
TiDB::TiDBCollators arg_collators{collator};
appendAggDescription(
{name},
{type},
arg_collators,
"any",
aggregate_descriptions,
aggregated_columns,
false,
context);
{name},
{type},
arg_collators,
"any",
aggregate_descriptions,
aggregated_columns,
false,
context);
agg_func_name = aggregate_descriptions.back().column_name;
}
auto [iter, inserted] = key_from_agg_func.insert({name, agg_func_name});
Expand Down

0 comments on commit 15ff512

Please sign in to comment.