Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 19941 invoked from network); 1 Feb 2008 23:01:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2008 23:01:38 -0000 Received: (qmail 70968 invoked by uid 500); 1 Feb 2008 23:01:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70932 invoked by uid 500); 1 Feb 2008 23:01:29 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 70923 invoked by uid 99); 1 Feb 2008 23:01:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 15:01:29 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 23:01:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C5B99714045 for ; Fri, 1 Feb 2008 15:01:12 -0800 (PST) Message-ID: <108624.1201906872806.JavaMail.jira@brutus> Date: Fri, 1 Feb 2008 15:01:12 -0800 (PST) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2917) Refactor DataTypeDescriptor and TypeDescriptor to result in cleaner code. In-Reply-To: <3013574.1184099584503.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564968#action_12564968 ] Daniel John Debrunner commented on DERBY-2917: ---------------------------------------------- Note on upgrade from older releases: Objects that are org.apache.derby.catalog.TypeDescriptor can be stored in these two system catalogs: SYSALIASES - ALIASINFO column as fields with a RoutineAliasInfo (parameter types and return types) SYSCOLUMNS - COLUMNDATATYPE ----------------------------------------------------------------------------------------------------------------------- SYSCOLUMNS.COLUMNDATATYPE is always populated with a TypeDescriptorImpl which is the simple correct form of TypeDescriptor for catalogs. SYSCOLUMNSRowFactory has enforced this since the code was contributed. Thus there are no upgrade issues for this catalog. SYSALIASES - ALIASINFO is populated with the runtime DataTypeDescriptor in releases older than 10.4, thus their on-disk format for a RoutineAliasInfo uses the serialized version that includes duplicate information (see earlier comment). Some upgrade code might be needed for 10.4 to cope with this format. > 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.