Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 43885 invoked from network); 7 Mar 2008 21:57:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2008 21:57:05 -0000 Received: (qmail 34663 invoked by uid 500); 7 Mar 2008 21:57:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34628 invoked by uid 500); 7 Mar 2008 21:57:00 -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 34619 invoked by uid 99); 7 Mar 2008 21:57:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 13:57:00 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 21:56:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 54C1A234C0A0 for ; Fri, 7 Mar 2008 13:55:46 -0800 (PST) Message-ID: <296012518.1204926946346.JavaMail.jira@brutus> Date: Fri, 7 Mar 2008 13:55:46 -0800 (PST) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3341) TABLE FUNCTION returning CHAR values does not return a correct value if the Java ResultSet class returns a value less than the length of the defined CHAR. In-Reply-To: <4221390.1201045834725.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-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576393#action_12576393 ] Daniel John Debrunner commented on DERBY-3341: ---------------------------------------------- > For the record, my first attempt to fix this problem was to insert CASTs into the bound tree. That did not work. It would be interesting to see the details on this to either allow others not to waste their time trying a similar solution or to allow others to get the solution working. The benefit of an open source community is to throw code out there and ask opinions on why it doesn't work, usually the whole community benefits through the exposure. > TABLE FUNCTION returning CHAR values does not return a correct value if the Java ResultSet class returns a value less than the length of the defined CHAR. > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-3341 > URL: https://issues.apache.org/jira/browse/DERBY-3341 > Project: Derby > Issue Type: Bug > Components: SQL > Reporter: Daniel John Debrunner > Fix For: 10.4.0.0 > > Attachments: derby-3341-01-coerce.diff, derby-3341-01-da-coerceWithTests.diff, derby-3341-02-aa-refGuide.diff, derby_3341_test.txt, rrefcreatefunctionstatement.html > > > Defining a column in the returned type as CHAR(10) requires that the returned value be of length 10 characters. > Defining a table function with a return type of: > returns TABLE column0 char( 10 ), column1 char( 10 )) > seems to just return whatever the Java ResultSet implementation handed it. > My guess this is true for all variable length types, no casting of the value occurs when it is returned to the SQL domain. > Java single value functions and procedure out parameters do perform any required casting to ensure the value is of the declared type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.