[MCOL-3474] TIMEDIFF() returns incorrect result Created: 2019-09-04  Updated: 2019-12-09  Resolved: 2019-12-09

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.4.0
Fix Version/s: 1.4.2

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

Sprint: 2019-06

 Description   

Build tested: 1.4.0-1

[dlee@master centos7]$ cat gitversionInfo.txt
server commit:
67452bc
engine commit:
4d2a159

Autopilot test case: features.functions

ColumnStore returned:

18 select cidx, CTIME, TIMEDIFF(CTIME,'2007-02-28 22:23:0') from datatypetestm order by cidx
19 --------------
20
21 cidx CTIME TIMEDIFF(CTIME,'2007-02-28 22:23:0')
22 1 13:00:00 -838:59:59
23 1 row in set

40 select cidx, CTIME from datatypetestm where TIMEDIFF(CTIME,'2007-02-28 22:23:0') <> 0 order by cidx
41 --------------
42
43 cidx CTIME
44 1 13:00:00
45 1 row in set

reference returned:

18 select cidx, CTIME, TIMEDIFF(CTIME,'2007-02-28 22:23:0') from datatypetestm order by cidx
19 --------------
20
21 cidx CTIME TIMEDIFF(CTIME,'2007-02-28 22:23:0')
22 1 13:00:00 NULL
23 1 row in set

40 select cidx, CTIME from datatypetestm where TIMEDIFF(CTIME,'2007-02-28 22:23:0') <> 0 order by cidx
41 --------------
42
43 Empty set

This test works in 1.2.4-1



 Comments   
Comment by Daniel Lee (Inactive) [ 2019-10-29 ]

Build verified: 1.4.1-1

engine commit:
3e7a964

Comment by Roman [ 2019-11-25 ]

I would like to reopen the bug. We broke q5 from working_tpch1/qa_fe_cnxFunctions/bug3333.sql
And also our timediff results with non-temporal data types differ from those of InnoDB.

Comment by Daniel Lee (Inactive) [ 2019-12-09 ]

Build verified: 1.4.2-1 source

Server

commit 6e1a53f89ee8d4eb9e66257b01898995aa7691de
Author: Sergei Golubchik <serg@mariadb.org>
Date: Mon Dec 2 18:07:11 2019 +0100

MENT-240 change plugin-maturity default to stable

Engine

/root/ColumnStore/buildColumnstoreFromGithubSource/server/engine
commit a9717ad49daded3a037313556f68bcad7826fa39
Merge: 3f5e1fd c29c41e
Author: Roman Nozdrin <drrtuy@gmail.com>
Date: Mon Dec 9 11:55:08 2019 +0200

Merge pull request #962 from jmrojas2332/MCOL-3474

MCOL 3474 Fix TIMEDIFF w/ non-temporal data types

Also verified working_tpch1/qa_fe_cnxFunctions/bug3333.sql regression test.

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