kennknowles commented on code in PR #36890:
URL: https://github.com/apache/beam/pull/36890#discussion_r2557608304


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/UdfImpl.java:
##########
@@ -38,13 +38,18 @@ private UdfImpl() {}
    *
    * @param clazz class that is used to implement the function
    * @param methodName Method name (typically "eval")
-   * @return created {@link Function} or null
+   * @return created {@link Function}
    */
   public static Function create(Class<?> clazz, String methodName) {
-    final Method method = findMethod(clazz, methodName);
+    final @Nullable Method method = findMethod(clazz, methodName);
+
     if (method == null) {
-      return null;
+      throw new RuntimeException(

Review Comment:
   This (and other equivalent places in this file) are a semantics change. 
instead of returning null and letting things NPE later on, I fail here. If the 
method isn't found, I doubt there's anything to be done but crash out. I'll see 
if any CI/CD fails.



-- 
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]

Reply via email to