Skip to content

Commit

Permalink
Mark 'arbitrary' Presto aggregate function order sensitive (facebooki…
Browse files Browse the repository at this point in the history
…ncubator#9646)

Summary:
As discussed in facebookincubator#9274 (comment), mark arbitrary aggregate as order sensitive, as a prerequisite for facebookincubator#9482

Pull Request resolved: facebookincubator#9646

Reviewed By: pedroerp

Differential Revision: D56710594

Pulled By: kagamiori

fbshipit-source-id: ce37c1d6bd707360531fd7bc8da03d638fbc55ac
  • Loading branch information
yanngyoung authored and facebook-github-bot committed Apr 29, 2024
1 parent e931e76 commit 4a0383b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ void registerArbitraryAggregate(
inputType->kindName());
}
},
{false /*orderSensitive*/},
withCompanionFunctions,
overwrite);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ TEST_F(AggregationFunctionRegTest, orderSensitive) {
"min",
"max",
"count",
"arbitrary",
"bool_and",
"bool_or",
"bitwise_and_agg",
Expand All @@ -74,8 +73,7 @@ TEST_F(AggregationFunctionRegTest, orderSensitive) {
"count_if",
"geometric_mean",
"histogram",
"reduce_agg",
"any_value"};
"reduce_agg"};
aggregate::prestosql::registerAllAggregateFunctions();
exec::aggregateFunctions().withRLock([&](const auto& aggrFuncMap) {
for (const auto& entry : aggrFuncMap) {
Expand All @@ -88,7 +86,7 @@ TEST_F(AggregationFunctionRegTest, orderSensitive) {

// Test some but not all order sensitive functions
std::set<std::string> orderSensitiveFunctions = {
"array_agg", "map_agg", "map_union", "set_agg"};
"array_agg", "arbitrary", "any_value", "map_agg", "map_union", "set_agg"};
exec::aggregateFunctions().withRLock([&](const auto& aggrFuncMap) {
for (const auto& entry : aggrFuncMap) {
if (entry.second.metadata.orderSensitive) {
Expand Down

0 comments on commit 4a0383b

Please sign in to comment.