db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4092) You should not be able to invoke a table function as a scalar function
Date Fri, 14 Aug 2009 18:52:14 GMT

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

Rick Hillegas updated DERBY-4092:

    Attachment: derby-4092-01-aa-noVTIsAsScalarValues.diff

Attaching derby-4092-01-aa-noVTIsAsScalarValues.diff. This patch raises an error during the
binding of scalar Java return values if a java.sql.ResultSet is seen.

I have not run regression tests yet although TableFunctionTest runs cleanly with the new test

Touches the following files:

M      java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java

Raise an error during bind() if a scalar value sits on top of a call to a table function.

M      java/engine/org/apache/derby/loc/messages.xml
M      java/shared/org/apache/derby/shared/common/reference/SQLState.java

A new message for this error state.

M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java

A test case to verify this fix.

> You should not be able to invoke a table function as a scalar function
> ----------------------------------------------------------------------
>                 Key: DERBY-4092
>                 URL: https://issues.apache.org/jira/browse/DERBY-4092
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:,,
>            Reporter: Rick Hillegas
>         Attachments: derby-4092-01-aa-noVTIsAsScalarValues.diff
> If you invoke a table function as a scalar function, Derby instantiates the ResultSet
returned by the table function and returns that ResultSet. This behavior looks wrong. Derby
should raise an error if you invoke a table function as a scalar function. Here is an example
of the problem:
> ij> values ( badVTI( 'foo' ) );
> 1              
> ---------------
> BadVTI@1ef69   

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

View raw message