[MCOL-150] FROM_DAYS() incorrect return 0000-00-00 for some numeric data types Created: 2016-06-17  Updated: 2016-09-13  Resolved: 2016-09-13

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.0.1
Fix Version/s: 1.0.3

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 1.0.3

 Description   

Build tested:

mscadmin> getsoft
getsoftwareinfo Fri Jun 17 17:27:58 2016

Name : mariadb-columnstore-platform Relocations: (not relocatable)
Version : 1.0 Vendor: MariaDB Corporation Ab
Release : 1 Build Date: Mon 13 Jun 2016 06:50:26 PM CDT

The following statements should return a valid date when the column value is possible.
InfiniDB and reference returns:

mysql> select cidx, CDECIMAL4, FROM_DAYS(CDECIMAL4) from datatypetestm order by cidx
-> ;
-----------------------------------

cidx CDECIMAL4 FROM_DAYS(CDECIMAL4)

-----------------------------------

1 -999 0000-00-00
2 -998 0000-00-00
3 -997 0000-00-00
4 -996 0000-00-00
5 -995 0000-00-00
6 995 0002-09-22
7 996 0002-09-23
8 997 0002-09-24
9 998 0002-09-25
10 999 0002-09-26
11 0 0000-00-00

-----------------------------------
11 rows in set (0.01 sec)

select cidx, CDECIMAL4, FROM_DAYS(CDECIMAL4) from datatypetestm order by cidx
--------------

cidx CDECIMAL4 FROM_DAYS(CDECIMAL4)
1 -999 0000-00-00
2 -998 0000-00-00
3 -997 0000-00-00
4 -996 0000-00-00
5 -995 0000-00-00
6 995 0000-00-00
7 996 0000-00-00
8 997 0000-00-00
9 998 0000-00-00
10 999 0000-00-00
11 0 0000-00-00
11 rows in set
--------------
select cidx, CDECIMAL5, FROM_DAYS(CDECIMAL5) from datatypetestm order by cidx
--------------

cidx CDECIMAL5 FROM_DAYS(CDECIMAL5)
1 -999 0000-00-00
2 -998 0000-00-00
3 -997 0000-00-00
4 -996 0000-00-00
5 -995 0000-00-00
6 995 0000-00-00
7 996 0000-00-00
8 997 0000-00-00
9 998 0000-00-00
10 999 0000-00-00
11 0 0000-00-00
11 rows in set

--------------
select cidx, CDECIMAL9_2, FROM_DAYS(CDECIMAL9_2) from datatypetestm order by cidx
--------------

cidx CDECIMAL9_2 FROM_DAYS(CDECIMAL9_2)
1 -9999.99 0000-00-00
2 -9999.98 0000-00-00
3 -9999.97 0000-00-00
4 -9999.96 0000-00-00
5 -9999.95 0000-00-00
6 9999.95 0000-00-00
7 9999.96 0000-00-00
8 9999.97 0000-00-00
9 9999.98 0000-00-00
10 9999.99 0000-00-00
11 0.00 0000-00-00
11 rows in set
--------------
select cidx, CSMALLINT, FROM_DAYS(CSMALLINT) from datatypetestm order by cidx
--------------

cidx CSMALLINT FROM_DAYS(CSMALLINT)
1 -766 0000-00-00
2 -765 0000-00-00
3 -764 0000-00-00
4 -763 0000-00-00
5 -762 0000-00-00
6 763 0000-00-00
7 764 0000-00-00
8 765 0000-00-00
9 766 0000-00-00
10 767 0000-00-00
11 0 0000-00-00
11 rows in set



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-06-18 ]

dleeyhIs this duplicate of MCOL-77 ?

Comment by Andrew Hutchings (Inactive) [ 2016-09-09 ]

I can't reproduce this with the latest develop tree. I think I fixed it in one of my previous date handling fixes.

Comment by Dipti Joshi (Inactive) [ 2016-09-09 ]

dleeyh Please test and close

Comment by Andrew Hutchings (Inactive) [ 2016-09-09 ]

For notes, this would have been fixed as part of my MCOL-274 fix.

Comment by Daniel Lee (Inactive) [ 2016-09-13 ]

Build verified:

mscadmin> getsoft
getsoftwareinfo Tue Sep 13 16:25:13 2016

Name : mariadb-columnstore-platform
Version : 1.0.3
Release : 1
Architecture: x86_64
Install Date: Mon 12 Sep 2016 09:48:35 AM CDT

Generated at Thu Feb 08 02:18:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.