Jackie-Jiang commented on code in PR #14195:
URL: https://github.com/apache/pinot/pull/14195#discussion_r1794249891
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ObjectFunctions.java:
##########
@@ -52,39 +52,8 @@ public static boolean isNotDistinctFrom(@Nullable Object
obj1, @Nullable Object
return !isDistinctFrom(obj1, obj2);
}
- @Nullable
- public static Object coalesce(@Nullable Object obj) {
- return coalesceVar(obj);
- }
-
- @Nullable
- @ScalarFunction(nullableParameters = true)
- public static Object coalesce(@Nullable Object obj1, @Nullable Object obj2) {
- return coalesceVar(obj1, obj2);
- }
-
- @Nullable
- @ScalarFunction(nullableParameters = true)
- public static Object coalesce(@Nullable Object obj1, @Nullable Object obj2,
@Nullable Object obj3) {
- return coalesceVar(obj1, obj2, obj3);
- }
-
- @Nullable
- @ScalarFunction(nullableParameters = true)
- public static Object coalesce(@Nullable Object obj1, @Nullable Object obj2,
@Nullable Object obj3,
- @Nullable Object obj4) {
- return coalesceVar(obj1, obj2, obj3, obj4);
- }
-
- @Nullable
- @ScalarFunction(nullableParameters = true)
- public static Object coalesce(@Nullable Object obj1, @Nullable Object obj2,
@Nullable Object obj3,
- @Nullable Object obj4, @Nullable Object obj5) {
- return coalesceVar(obj1, obj2, obj3, obj4, obj5);
- }
-
- @Nullable
- private static Object coalesceVar(Object... objects) {
+ @ScalarFunction(nullableParameters = true, isVarArg = true)
+ public static Object coalesce(Object... objects) {
Review Comment:
Let's keep the `@Nullable` annotation since it could return `null`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]