walterddr commented on code in PR #10266:
URL: https://github.com/apache/pinot/pull/10266#discussion_r1105260848
##########
pinot-common/src/test/java/org/apache/pinot/common/function/FunctionDefinitionRegistryTest.java:
##########
@@ -42,9 +42,9 @@ public class FunctionDefinitionRegistryTest {
);
private static final List<String> IGNORED_FUNCTION_NAMES = ImmutableList.of(
// functions we are not supporting post transform anyway
- "valuein", "mapvalue", "inidset", "lookup", "groovy", "scalar",
"geotoh3", "case", "not_in", "timeconvert",
+ "valuein", "mapvalue", "inidset", "lookup", "groovy", "scalar",
"geotoh3", "not_in", "timeconvert",
// functions not needed for register b/c they are in std sql table or
they will not be composed directly.
- "in", "and", "or", "not", "range", "extract"
Review Comment:
why is "not" also included here?
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ObjectFunctions.java:
##########
@@ -94,33 +94,41 @@ private static Object coalesceVar(Object... objects) {
return null;
}
- @ScalarFunction
- public static Object caseWhen(boolean c1, Object o1, Object oe) {
+ @Nullable
+ @ScalarFunction(nullableParameters = true, names = {"case", "caseWhen",
"case_when"})
Review Comment:
technically `caseWhen` is not supposed to be a valid query function (e.g.
should not be user-facing). It is only done this way b/c in V2 engine we
manually encode the `case when ... then .. else ... end` as `caseWhen` to
distinguish from the function name `case`, which is matched to the transform
function instead of the scalar function
--
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]