db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5635) Provide implementation for getMetaData() in VTITemplate
Date Thu, 01 Mar 2012 20:09:59 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5635:
--------------------------------------

    Attachment: d5635.diff

Attaching a patch that removes the abstract method getMetaData() from VTITemplate so that
it instead inherits the getMetaData() method from its base class (VTITemplateBase). The method
in VTITemplateBase throws a not-implemented exception.

The patch also removes the getMetaData() implementations from VTITemplate's sub-classes StringColumnVTI,
StringArrayVTI and SampleVTI, so that those classes also inherit the method from VTITemplateBase.
The removed implementations either returned null or threw an exception, and could safely be
replaced by VTITemplateBase's default implementation since they're never called.

The getMetaData() methods in the system VTIs are preserved, since they are actually used.

All the regression tests ran cleanly with the patch.
                
> Provide implementation for getMetaData() in VTITemplate
> -------------------------------------------------------
>
>                 Key: DERBY-5635
>                 URL: https://issues.apache.org/jira/browse/DERBY-5635
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5635.diff
>
>
> VTITemplate defines getMetaData() as an abstract method. That method doesn't appear to
be needed for user-defined table functions, so it would be good to provide a default implementation
(could just throw an exception) so that less boilerplate is needed when writing table functions.
The method does however get used by system VTIs, which is probably why it was made abstract
in the first place. The system VTIs should still override getMetaData().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message