You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/02/11 14:46:59 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #2718: [CALCITE-5008] Ignore synthetic and static methods in MetadataDef

rubenada commented on a change in pull request #2718:
URL: https://github.com/apache/calcite/pull/2718#discussion_r804717625



##########
File path: core/src/main/java/org/apache/calcite/rel/metadata/MetadataDef.java
##########
@@ -41,7 +42,10 @@ private MetadataDef(Class<M> metadataClass,
     this.handlerClass = handlerClass;
     this.methods = ImmutableList.copyOf(methods);
     final Method[] handlerMethods = Arrays.stream(handlerClass.getDeclaredMethods())
-        .filter(m -> !m.getName().equals("getDef")).toArray(i -> new Method[i]);
+        .filter(m -> !m.getName().equals("getDef"))

Review comment:
       @jacques-n it seems this filter was originally introduced via CALCITE-4929 (see [4ff5fa8](https://github.com/apache/calcite/commit/4ff5fa89c180ebc30d8fb324c2a50b0e9797b9ca) ), what do you think about the current patch?
   Also, I noticed that in  CALCITE-4929 a similar filter was introduced in [RelMetadataHandlerGeneratorUtil.java](https://github.com/apache/calcite/commit/4ff5fa89c180ebc30d8fb324c2a50b0e9797b9ca#diff-b5bac3d2a905799f710aef8e5fd02dd659dc9e6e2c8e7b05ed0c34022025b8e1) , if we apply this patch, should we apply the change in both files too?




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org