You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jacques Nadeau (Jira)" <ji...@apache.org> on 2021/12/16 17:39:00 UTC
[jira] [Commented] (CALCITE-4942) Deprecate Bolier plate for Rel Metadata
[ https://issues.apache.org/jira/browse/CALCITE-4942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17460919#comment-17460919 ]
Jacques Nadeau commented on CALCITE-4942:
-----------------------------------------
Glad you're picking this up. Will be interested how you propose doing this without having breaking changes (and refactoring reflection reliance on existing getDef() functionality)
> Deprecate Bolier plate for Rel Metadata
> ---------------------------------------
>
> Key: CALCITE-4942
> URL: https://issues.apache.org/jira/browse/CALCITE-4942
> Project: Calcite
> Issue Type: Improvement
> Reporter: James Starr
> Assignee: James Starr
> Priority: Major
>
> To define a Rel metadata type you need to create 2 class, 2 methods and a static variable. However, current implementation of RelMetadata back by Janino only require the Handler class a single method signature. The current metadata handler interface also has a generic that provides no type safety through out code.
> Currently to define a rel metadata type:
> {code:java}
> public class MyMetadata extends Metadata {
> MetadataDef DEF = ...
>
> VALUE myMethod1();
> class Handler extends RelHandler<MyMetadata> {
> VALUE myMethod2(RelNode, MetadataQuery)
> }
> }
> {code}
> What is actually needed to define a rel metadata type:
> {code:java}
> class MyMetadataHandler extends RelHandler {
> VALUE myMethod(RelNode, MetadataQuery)
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)