[MCOL-98] Behavioral differences between MariaDB and ColumnStore for few functions Created: 2016-06-02  Updated: 2016-10-27  Resolved: 2016-10-27

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 1.0.4

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

Issue Links:
Duplicate
is duplicated by MCOL-92 Support full numeric ranges for all d... Closed
PartOf
is part of MCOL-280 Beta issues Closed
Sprint: 2016-19, 2016-20, 2016-21

 Description   

Build tested:
mscadmin> getsoft
getsoftwareinfo Thu Jun 2 08:36:01 2016

Name : mariadb-columnstore-platform Relocations: (not relocatable)
Version : 1.0 Vendor: MariaDB Corporation Ab
Release : 0 Build Date: Fri 27 May 2016 03:07:53 PM CDT
Install Date: Mon 30 May 2016 10:07:40 AM CDT Build Host: srvbuilder
Group : Applications Source RPM: mariadb-columnstore-1.0-0.src.rpm

POWER
POW
EXP
DIV
COT

When supplied with crazily large or small values as parameters for the above functions, MariaDB returns a value out of range error, where Columnstore returns a value, which may or may not be correct.

Here is a sample error msg From MariaDB:

ERROR 1690 (22003) at line 1: DOUBLE value is out of range in 'pow(`qrepd01`.`datatypetestm`.`CBIGINT`,(-(3) * `qrepd01`.`datatypetestm`.`CIDX`))'

As for cot(0), which is a divided-by-zero case, MariaDB returns an out of range error, where Columnstore returns NULL.

Could this behavioral difference caused by a settings in the my.cnf file?

For now, we are treating these differences as known/expected differences.



 Comments   
Comment by David Thompson (Inactive) [ 2016-09-21 ]

In these cases, for beta, a sane error or value should be returned.

Comment by Andrew Hutchings (Inactive) [ 2016-10-04 ]

I just fixed COT(0) in MCOL-289. The fix for this can probably be applied to the other functions for saturated values.

Comment by Daniel Lee (Inactive) [ 2016-10-27 ]

Build tested: 1.0.4-1 beta

mcsadmin> getsoft
getsoftwareinfo Thu Oct 27 11:47:05 2016

Name : mariadb-columnstore-platform
Version : 1.0.4
Release : 1
Architecture: x86_64
Install Date: Thu 27 Oct 2016 09:02:05 AM CDT
Group : Applications/Databases
Size : 9926755
License : Copyright (c) 2016 MariaDB Corporation Ab., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.
Signature : (none)
Source RPM : mariadb-columnstore-platform-1.0.4-1.src.rpm
Build Date : Tue 25 Oct 2016 12:06:52 PM CDT
Build Host : centos7

All functions, except DIV, now returned the value out of range messages. DIV still returned a NULL value without error.

MariaDB [mytest]> drop table dlee1;
Query OK, 0 rows affected (2.31 sec)

MariaDB [mytest]> create table mcol98 (c1 int) engine=columnstore;
Query OK, 0 rows affected (16.97 sec)

MariaDB [mytest]> insert into mcol98 values (0);
Query OK, 1 row affected (0.28 sec)

MariaDB [mytest]> select 5 div c1 from mcol98;
----------

5 div c1

----------

NULL

----------
1 row in set (0.15 sec)

MariaDB [mytest]> select c1, 5 div c1 from mcol98;
--------------+

c1 5 div c1

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

0 NULL

--------------+
1 row in set (0.05 sec)

Comment by Ben Thompson (Inactive) [ 2016-10-27 ]

Columnstore was returning 0 which was incorrect and changed to return NULL matching reference database.

Comment by Daniel Lee (Inactive) [ 2016-10-27 ]

Verified:

MariaDB [mytest]> create table mcol98 (c1 int);
Query OK, 0 rows affected (0.98 sec)

MariaDB [mytest]> show create table mcol98;
--------------------------------------------------------------------------------------------------+

Table Create Table

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

mcol98 CREATE TABLE `mcol98` (
`c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1

--------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [mytest]> insert into mcol98 values (0);
Query OK, 1 row affected (0.00 sec)

MariaDB [mytest]> select 5 div c1 from mcol98;
----------

5 div c1

----------

NULL

----------
1 row in set (0.00 sec)

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