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 "Bernt M. Johnsen (JIRA)" <de...@db.apache.org> on 2005/11/28 14:58:37 UTC
[jira] Created: (DERBY-729) Scalar time and date functions return NULL when argument is NULL
Scalar time and date functions return NULL when argument is NULL
----------------------------------------------------------------
Key: DERBY-729
URL: http://issues.apache.org/jira/browse/DERBY-729
Project: Derby
Type: Bug
Reporter: Bernt M. Johnsen
The scalar time and date functions should return NULL when argument is NULL.
Sample ij run that reproduces the bug
ij> create table dt (ts timestamp);
0 rows inserted/updated/deleted
ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
2 rows inserted/updated/deleted
ij> select * from dt;
TS
--------------------------
2005-11-28 14:49:40.0
NULL
2 rows selected
ij> select {fn hour(ts)} from dt;
1
-----------
14
0
might be a problem with other scalar functions too.
--
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
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen updated DERBY-729:
-----------------------------------
Derby Info: [Release Note Needed] (was: [Patch Available, Release Note Needed])
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Resolved: (DERBY-729) Scalar time and date functions return
0 instead NULL when argument is NULL
Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Myrna van Lunteren resolved DERBY-729.
--------------------------------------
Resolution: Fixed
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: https://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.6
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat, releaseNote.html
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen updated DERBY-729:
-----------------------------------
Attachment: DERBY-729-1.diff
DERBY-729-1.stat
Comments are appreciated.
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen updated DERBY-729:
-----------------------------------
Derby Info: [Patch Available]
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Reopened: (DERBY-729) Scalar time and date functions return
0 instead NULL when argument is NULL
Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Myrna van Lunteren reopened DERBY-729:
--------------------------------------
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: https://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.6
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen updated DERBY-729:
-----------------------------------
Fix Version/s: 10.3.0.0
Affects Version/s: 10.1.3.2
10.2.1.5
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Commented: (DERBY-729) Scalar time and date functions return
0 instead NULL when argument is NULL
Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=comments#action_12438447 ]
Dyre Tjeldvoll commented on DERBY-729:
--------------------------------------
Hi Bernt,
I have looked at the patch, and I think it looks solid, and the test seems to cover the relevant cases.
Could there be existing applications that somehow rely on the incorrect behavior? If so, should there perhaps be a release note?
+1 to commit
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Closed: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen closed DERBY-729.
----------------------------------
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Assigned: (DERBY-729) Scalar time and date functions return
0 instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen reassigned DERBY-729:
--------------------------------------
Assignee: Bernt M. Johnsen
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Myrna van Lunteren updated DERBY-729:
-------------------------------------
Attachment: releaseNote.html
I'm attaching an attempt at a release note.
It's a little contrived, maybe it'd be clear enough with just the summary and application change headings?
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: https://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.6
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat, releaseNote.html
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Daniel John Debrunner updated DERBY-729:
----------------------------------------
Summary: Scalar time and date functions return 0 instead NULL when argument is NULL (was: Scalar time and date functions return NULL when argument is NULL)
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Reporter: Bernt M. Johnsen
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Updated: (DERBY-729) Scalar time and date functions return 0
instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen updated DERBY-729:
-----------------------------------
Derby Info: [Patch Available, Release Note Needed] (was: [Patch Available])
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Resolved: (DERBY-729) Scalar time and date functions return
0 instead NULL when argument is NULL
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Bernt M. Johnsen resolved DERBY-729.
------------------------------------
Resolution: Fixed
Committed revision 451147.
> Scalar time and date functions return 0 instead NULL when argument is NULL
> --------------------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.1.3.2, 10.2.1.5
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-729-1.diff, DERBY-729-1.stat
>
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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
[jira] Updated: (DERBY-729) Scalar time and date functions return
NULL when argument is NULL
Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-729?page=all ]
Mike Matrigali updated DERBY-729:
---------------------------------
Component: SQL
> Scalar time and date functions return NULL when argument is NULL
> ----------------------------------------------------------------
>
> Key: DERBY-729
> URL: http://issues.apache.org/jira/browse/DERBY-729
> Project: Derby
> Type: Bug
> Components: SQL
> Reporter: Bernt M. Johnsen
>
> The scalar time and date functions should return NULL when argument is NULL.
> Sample ij run that reproduces the bug
> ij> create table dt (ts timestamp);
> 0 rows inserted/updated/deleted
> ij> insert into dt values ({ts '2005-11-28 14:49:40'}), (NULL);
> 2 rows inserted/updated/deleted
> ij> select * from dt;
> TS
> --------------------------
> 2005-11-28 14:49:40.0
> NULL
>
> 2 rows selected
> ij> select {fn hour(ts)} from dt;
> 1
> -----------
> 14
> 0
> might be a problem with other scalar functions too.
--
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