[MCOL-4255] function ROUND incorrect for DATE type Created: 2020-08-19  Updated: 2020-12-02  Resolved: 2020-12-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.0.0
Fix Version/s: 5.5.1

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

Issue Links:
Relates
relates to MCOL-3472 ROUND() returns incorrect result Closed
Epic Link: ColumnStore Compatibility Improvements

 Description   

function ROUND returns the linux time rather than yyymmdd, which is what it used to return. This is a regression when linked with MDB 10.5



 Comments   
Comment by David Hall (Inactive) [ 2020-10-30 ]

See working_tpch1/qa_fe_cnxFunctions/ROUND.NM.sql

Comment by Daniel Lee (Inactive) [ 2020-12-02 ]

Build verified: 5.5.1 (Drone 1233)

MariaDB [mytest]> select cidx, CDATE, round(CDATE,10) from datatypetestm;
-------------------------------

cidx CDATE round(CDATE,10)

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

1 1997-01-01 19970101
2 1997-01-01 19970101
3 1997-01-02 19970102
4 1997-01-03 19970103
5 1997-01-04 19970104
6 2009-12-28 20091228
7 2009-12-29 20091229
8 2009-12-30 20091230
9 2009-12-31 20091231
10 2009-12-31 20091231
11 2009-12-31 20091231

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

MariaDB [mytest]> select cidx, CDATE, round(CDATE,0) from datatypetestm;
------------------------------

cidx CDATE round(CDATE,0)

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

1 1997-01-01 19970101
2 1997-01-01 19970101
3 1997-01-02 19970102
4 1997-01-03 19970103
5 1997-01-04 19970104
6 2009-12-28 20091228
7 2009-12-29 20091229
8 2009-12-30 20091230
9 2009-12-31 20091231
10 2009-12-31 20091231
11 2009-12-31 20091231

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

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