You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/07/10 22:40:05 UTC

[jira] Commented: (DERBY-2917) Refactor DataTypeDescriptor and TypeDescriptor to result in cleaner code.

    [ https://issues.apache.org/jira/browse/DERBY-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511565 ] 

Daniel John Debrunner commented on DERBY-2917:
----------------------------------------------

Changing this would lead to TypeId and DataTypeDescriptor not being formattable (I think).
The serialized form of DataTypedescriptor writes out duplicate information

   TypeId
      BaseTypeIdImpl      <<< duplicate of information written out by TypeDescriptorImpl
   TypeDescriptorImpl
      BaseTypeIdImpl
      <type attributes>

A DataTypedescriptor can be fully recreated from its TypeDescriptor(Impl), thus there is no need to write out anything else.
Once DataTypedescriptor becomes only a runtime representation of the type, then all persistent types would be written out as a TypeDescriptor,
using DataTypedescriptor.getCatalogType() as required.

> Refactor DataTypeDescriptor and TypeDescriptor to result in cleaner code.
> -------------------------------------------------------------------------
>
>                 Key: DERBY-2917
>                 URL: https://issues.apache.org/jira/browse/DERBY-2917
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Services, SQL
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>
> TypeDescriptor ideally represents a catalog type (column in a table, parameter in a procedure etc.)
> DataTypeDescriptor represents a runtime type
> Currently DataTypeDescriptor  extends (implements) TypeDescriptor , but the relationship would be cleaner if DataTypeDescriptor  had a TypeDescriptor (but was not a TypeDescriptor).
> One can at the moment obtain a TypeDescriptor from a DataTypeDescriptor  using DataTypeDescriptor.getCatalogType() but most code just treats DataTypeDescriptor   as a TypeDescriptor. This has lead to a couple of issues:
> 1) When a routine's parameter/return type is written out a DataTypeDescriptor is written to disk. This results in type information being repeated in the serialized form, thus increasing the on-disk size of a Derby database.
> 2) Collation derivation is runtime only (all persistent types by definition have implicit type) but the derivation is on the catalog Typedescriptor interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.