[ 
http://issues.apache.org/jira/browse/DERBY-1839?page=comments#action_12440567 ] 
            
Susan Cline commented on DERBY-1839:
------------------------------------

I had 5 comments related to this bug, shown below with the html file name and 
the topic I commented on.   The zip file I looked in above to see the patch was 
derby1839_functions1.zip.  If I missed another zip file which had the patch in 
it, could you please let me know?

These two files were fixed:

rrefbuiltsmallint       SMALLINT 
rrefsqlj29930   UCASE or UPPER 

But these three were not:

rreftimestampfunc       TIMESTAMP 
rrefsecondfunc  SECOND 
rrefsqlj93082   SUBSTR

Here is why they were not fixed:

TIMESTAMP
----------------
The new document still shows an incorrect example, namely:

The following clause returns the value 1998-12-25-17.12.30.000000:
VALUES TIMESTAMP('1998-12-25', '17.12.30')

Here is the correct output:

VALUES TIMESTAMP('1998-12-25', '17.12.30');
1
--------------------------
1998-12-25 17:12:30.0
****************************************************

SECOND
------------

I believe that DERBY-908 partially addresses my comments, but it does not 
address all of them.  The comment that is not addressed in either DERBY-908 or 
DERBY-1924 (this bug is mentioned on the ReferenceManualTenTwo wiki page, but 
it has nothing to do with time),  is this:

If the argument can be null, the result can be null; if the argument is null, 
the result is
the null value.

I'm not entirely clear I understand what this means, but here is a test to show 
that if the
argument is null, the result is NOT null;
 
ij> create table timestamp_tab (id integer, col2 timestamp);
0 rows inserted/updated/deleted
ij> insert  into timestamp_tab(id) values (1);
1 row inserted/updated/deleted
ij> insert into timestamp_tab values (2, null);
1 row inserted/updated/deleted
ij> select second(col2) from timestamp_tab;
1
----------------------
0.0  << these should be null according to the doc, and are 0
0.0
***************************************************************
SUBSTR
------------

SUBSTR({ CharacterExpression },
   StartPosition [, LengthOfString ] )

The updated document says this:

The SUBSTR function returns NULL if the parameter lengthOfString is specified 
and if the parameter is less than zero. 

But this is not true based on the example I gave in my comments:

ij> values substr('hello', 1,-2);
1
---------------
ERROR 22011: The second or third argument of the SUBSTR function is out of range
***************************************************************************************

Thanks,

Susan

> Doc Review Updates - Ref Manual
> -------------------------------
>
>                 Key: DERBY-1839
>                 URL: http://issues.apache.org/jira/browse/DERBY-1839
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.2.1.6
>            Reporter: Laura Stewart
>         Assigned To: Laura Stewart
>             Fix For: 10.2.2.0
>
>         Attachments: 1839_SQLstatements.diff, derby1839_functions1.diff, 
> derby1839_functions1.zip, derby1839_SQLstatement_4.diff, 
> derby1839_SQLstatements2.diff, derby1839_SQLstatements2_html.zip, 
> derby1839_SQLstatements3.diff, derby1839_SQLstatements3_html.zip, 
> derby1839_SQLstatements4_html.zip, derby1839_SQLstatements_html.zip, 
> derby1839_TANCEILfunctions.diff, derby1839_TANCEILfunctions_html.zip, 
> derby1839_XML+functions_1.diff, derby1839_XML+functions_2.diff, 
> derby1839_XML+functions_html1.zip, derby1839_XML+functions_html2.zip
>
>
> This JIRA issue will be used to track all of the issues found in the 10.2 doc 
> review of the Reference Manual.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to