Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46A02D2BA for ; Thu, 13 Dec 2012 10:40:17 +0000 (UTC) Received: (qmail 68380 invoked by uid 500); 13 Dec 2012 10:40:17 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 68242 invoked by uid 500); 13 Dec 2012 10:40:16 -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 68230 invoked by uid 99); 13 Dec 2012 10:40:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 10:40:16 +0000 Date: Thu, 13 Dec 2012 10:40:16 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-6003) Create row templates outside of the generated code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-6003: -------------------------------------- Issue & fix info: Patch Available > Create row templates outside of the generated code > -------------------------------------------------- > > Key: DERBY-6003 > URL: https://issues.apache.org/jira/browse/DERBY-6003 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.10.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: d6003-1a-cleanup.diff, d6003-2a-unused-field.diff, d6003-3a-safe-downgrade.diff, d6003-3b-downgrade-workaround-in-tests.diff, d6003-3c-downgrade-with-stored-proc.diff, d6003-4a-scanresultset.diff, d6003-5a-sort-vti-aggregate-window.diff, d6003-6a-index-to-base-row.diff > > > The constructors for many of the result set classes take GeneratedMethod parameters that create row templates (an ExecRow of a certain size and column types, each column initialized to an SQL null value). > As an alternative, the compiler could produce an ExecRow instance and put it into the savedObjects field of GenericPreparedStatement, and the constructors could take parameter that points to the object in savedObjects. Where the result sets currently invoke the generated method to produce a fresh template, they could instead clone the saved object. > Advantages with the suggested approach would be: > - Reduce the size of the code generator, which should reduce total code complexity. > - Reduce the amount of generated code, which makes it easier for tools (profilers, static code analyzers, IDEs) to map executable code to source code. > - Reduce the actual number of generated methods, which makes it less likely that queries need to use reflection to invoke the remaining generated methods (there's a switchover from DirectCall to ReflectCall when the number of generated methods exceeds 10). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira