You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/12/17 02:30:00 UTC
[jira] [Updated] (CALCITE-4942) Deprecate boilerplate for Rel Metadata
[ https://issues.apache.org/jira/browse/CALCITE-4942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-4942:
---------------------------------
Summary: Deprecate boilerplate for Rel Metadata (was: Deprecate Bolier plate for Rel Metadata)
> Deprecate boilerplate 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)