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 "Bergquist, Brett" <BB...@canoga.com> on 2011/08/06 01:24:10 UTC

Need guidance in writing test for (DERBY-5370) The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types

Where in the testing packages should this type of test go.  The RestrictedVTI is tested as part of "org.apache.derbyTesting.functionTests.tests.lang" but this really is an API test, not a language test.  So where would the appropriate place be?
________________________________________
From: Brett Bergquist (JIRA) [jira@apache.org]
Sent: Tuesday, August 02, 2011 9:41 AM
To: derby-dev@db.apache.org
Subject: [jira] [Created] (DERBY-5370) The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types

The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types
---------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-5370
                 URL: https://issues.apache.org/jira/browse/DERBY-5370
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.8.1.2
            Reporter: Brett Bergquist


The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types.  This method is useful for building the WHERE clause when implementing a Restricted Table Function.  The result of calling the toSQL method with restrictions on columns of these types does not produce valid SQL constants.  For example with a VARCHAR column being restricted the single quote characters are not placed round the string constant.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira





Re: Need guidance in writing test for (DERBY-5370) The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types

Posted by Rick Hillegas <ri...@oracle.com>.
Hi Brett,

I agree with Dag. I think the best place would be RestrictedVTITest, 
alongside the other tests for RestrictedVTIs. I don't think that we have 
a package for tests which stress the parts of Derby's public api which 
fall outside SQL and JDBC. I see that we have a SecurityCheck test which 
probes the public api; that test lives in 
org.apache.derbyTesting.functionTests.util, which doesn't seem any 
better motivated to me. If we decide to create a package for public api 
tests later on, then we can move RestrictedVTITest and SecurityCheck to 
the new package as part of that effort.

Thanks,
-Rick

On 8/8/11 6:10 AM, Dag H. Wanvik wrote:
> On 06.08.2011 01:24, Bergquist, Brett wrote:
>> Where in the testing packages should this type of test go.  The 
>> RestrictedVTI is tested as part of 
>> "org.apache.derbyTesting.functionTests.tests.lang" but this really is 
>> an API test, not a language test.  So where would the appropriate 
>> place be?
>
> JDBC API tests are here:
>
> org.apache.derbyTesting.functionTests.tests.jdbcapi
>
> but I think putting this one in lang is ok, since that's where the VTI 
> tests live.
>
> Dag
>
>> ________________________________________
>> From: Brett Bergquist (JIRA) [jira@apache.org]
>> Sent: Tuesday, August 02, 2011 9:41 AM
>> To: derby-dev@db.apache.org
>> Subject: [jira] [Created] (DERBY-5370) The toSQL method of the 
>> org.apache.derby.vti.Restriction class does not output correct 
>> constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types
>>
>> The toSQL method of the org.apache.derby.vti.Restriction class does 
>> not output correct constants for VARCHAR, Timestamp, Date, Time, or 
>> CHAR FOR BIT DATA types
>> --------------------------------------------------------------------------------------------------------------------------------------------------------------- 
>>
>>
>>                   Key: DERBY-5370
>>                   URL: https://issues.apache.org/jira/browse/DERBY-5370
>>               Project: Derby
>>            Issue Type: Bug
>>            Components: SQL
>>      Affects Versions: 10.8.1.2
>>              Reporter: Brett Bergquist
>>
>>
>> The toSQL method of the org.apache.derby.vti.Restriction class does 
>> not output correct constants for VARCHAR, Timestamp, Date, Time, or 
>> CHAR FOR BIT DATA types.  This method is useful for building the 
>> WHERE clause when implementing a Restricted Table Function.  The 
>> result of calling the toSQL method with restrictions on columns of 
>> these types does not produce valid SQL constants.  For example with a 
>> VARCHAR column being restricted the single quote characters are not 
>> placed round the string constant.
>>
>>
>> -- 
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: 
>> http://www.atlassian.com/software/jira
>>
>>
>>
>>
>
>


Re: Need guidance in writing test for (DERBY-5370) The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types

Posted by "Dag H. Wanvik" <da...@oracle.com>.
On 06.08.2011 01:24, Bergquist, Brett wrote:
> Where in the testing packages should this type of test go.  The RestrictedVTI is tested as part of "org.apache.derbyTesting.functionTests.tests.lang" but this really is an API test, not a language test.  So where would the appropriate place be?

JDBC API tests are here:

org.apache.derbyTesting.functionTests.tests.jdbcapi

but I think putting this one in lang is ok, since that's where the VTI 
tests live.

Dag

> ________________________________________
> From: Brett Bergquist (JIRA) [jira@apache.org]
> Sent: Tuesday, August 02, 2011 9:41 AM
> To: derby-dev@db.apache.org
> Subject: [jira] [Created] (DERBY-5370) The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types
>
> The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                   Key: DERBY-5370
>                   URL: https://issues.apache.org/jira/browse/DERBY-5370
>               Project: Derby
>            Issue Type: Bug
>            Components: SQL
>      Affects Versions: 10.8.1.2
>              Reporter: Brett Bergquist
>
>
> The toSQL method of the org.apache.derby.vti.Restriction class does not output correct constants for VARCHAR, Timestamp, Date, Time, or CHAR FOR BIT DATA types.  This method is useful for building the WHERE clause when implementing a Restricted Table Function.  The result of calling the toSQL method with restrictions on columns of these types does not produce valid SQL constants.  For example with a VARCHAR column being restricted the single quote characters are not placed round the string constant.
>
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
>