[MCOL-3959] microsecond support for from_unixtime Created: 2020-04-21  Updated: 2020-11-12  Resolved: 2020-04-30

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.4.3
Fix Version/s: 1.4.4, 1.5.1

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

Epic Link: ColumnStore Compatibility Improvements
Sprint: 2020-7

 Description   

Currently, CS from_unixtime rounds to the nearest second. This is different behavior than MDB, which doesn't round.



 Comments   
Comment by David Hall (Inactive) [ 2020-04-23 ]

Handle decimal types different than float types in order to preserve precision.

Comment by David Hall (Inactive) [ 2020-04-24 ]

CREATE TABLE `c1` ( `a` decimal(4,2) DEFAULT NULL) ENGINE=Columnstore;
INSERT INTO c1 values(9.95);

Before patch
MariaDB [test]> select a, from_unixtime(a) from c1;
----------------------------+

a from_unixtime(a)

----------------------------+

9.95 1970-01-01 00:00:10.00

After patch
MariaDB [test]> select a, from_unixtime(a) from c1;
----------------------------+

a from_unixtime(a)

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

9.95 1970-01-01 00:00:09.95
Comment by Daniel Lee (Inactive) [ 2020-04-30 ]

Builds verified: 1.4.4-1, 1.5.0-1 source

1.4.4-1

/root/ColumnStore/buildColumnstoreFromGithubSource/server
commit 00abe03ad1da3719e06f7112000a331ee2b6786a
Author: Patrick LeBlanc <43503225+pleblanc1976@users.noreply.github.com>
Date: Wed Apr 29 10:00:54 2020 -0500

/root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
commit 2b67ac7f3537bd4b4d132c8a6c3a53e4cc63f4a1
Merge: beaac49 23d65dc
Author: benthompson15 <ben.thompson.015@gmail.com>
Date: Tue Apr 28 15:40:45 2020 -0500

1.5.0-1

/root/ColumnStore/buildColumnstoreFromGithubSource/server
commit 25eb50d6c002e987e2d240402391549d408c18d9
Author: Alexey Bychko <abychko@gmail.com>
Date: Thu Apr 23 12:36:13 2020 +0700

commit 6ad38ccc28d31a099d052e5de827543808843a3c
Merge: 658abae bb3e76b
Author: benthompson15 <ben.thompson.015@gmail.com>
Date: Fri Apr 24 14:31:09 2020 -0500

Reproduced the issue in 1.4.3-4 and verified the fix in 1.4.4-1 and 1.5.0-1

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