Skip to content

Commit dddd35f

Browse files
mark min, max and sum as aggregates
1 parent eecf9dd commit dddd35f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/include/rfuns_extension.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ ScalarFunctionSet base_r_as_integer();
6464
ScalarFunctionSet base_r_as_numeric();
6565

6666
// sum
67-
AggregateFunctionSet base_r_sum();
68-
AggregateFunctionSet base_r_min();
69-
AggregateFunctionSet base_r_max();
67+
AggregateFunctionSet base_r_aggregate_sum();
68+
AggregateFunctionSet base_r_aggregate_min();
69+
AggregateFunctionSet base_r_aggregate_max();
7070

7171
ScalarFunctionSet binary_dispatch(ScalarFunctionSet fn) ;
7272

src/minmax.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ AggregateFunctionSet base_r_minmax(std::string name) {
142142
return set;
143143
}
144144

145-
AggregateFunctionSet base_r_min() {
146-
return base_r_minmax<RMinOperation>("r_base::min");
145+
AggregateFunctionSet base_r_aggregate_min() {
146+
return base_r_minmax<RMinOperation>("r_base::aggregate::min");
147147
}
148148

149-
AggregateFunctionSet base_r_max() {
150-
return base_r_minmax<RMaxOperation>("r_base::max");
149+
AggregateFunctionSet base_r_aggregate_max() {
150+
return base_r_minmax<RMaxOperation>("r_base::aggregate::max");
151151
}
152152

153153

src/rfuns_extension.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ static void register_rfuns(DatabaseInstance &instance) {
3737
ExtensionUtil::RegisterFunction(instance, base_r_as_integer());
3838
ExtensionUtil::RegisterFunction(instance, base_r_as_numeric());
3939

40-
ExtensionUtil::RegisterFunction(instance, base_r_sum());
41-
ExtensionUtil::RegisterFunction(instance, base_r_min());
42-
ExtensionUtil::RegisterFunction(instance, base_r_max());
40+
ExtensionUtil::RegisterFunction(instance, base_r_aggregate_sum());
41+
ExtensionUtil::RegisterFunction(instance, base_r_aggregate_min());
42+
ExtensionUtil::RegisterFunction(instance, base_r_aggregate_max());
4343
}
4444
} // namespace rfuns
4545

src/sum.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void add_RSum(AggregateFunctionSet& set, const LogicalType& type) {
117117
));
118118
}
119119

120-
AggregateFunctionSet base_r_sum() {
121-
AggregateFunctionSet set("r_base::sum");
120+
AggregateFunctionSet base_r_aggregate_sum() {
121+
AggregateFunctionSet set("r_base::aggregate::sum");
122122

123123
add_RSum(set, LogicalType::BOOLEAN);
124124
add_RSum(set, LogicalType::INTEGER);

0 commit comments

Comments
 (0)