[MCOL-174] | operator returns wrong results in 712 of 2186 tests Created: 2016-06-23  Updated: 2019-12-10  Resolved: 2019-12-10

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

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

Issue Links:
Blocks
is blocked by MCOL-351 logical or resolves to null for some ... Closed
Relates
relates to MCOL-350 can't select date value of 0000-00-00 Closed
Epic Link: ColumnStore Compatibility Improvements
Sprint: 2019-06

 Description   

git clone https://github.com/greenlion/columnstore_tests
sudo yum install php-cli php-mysql php-pear
cd columnstore_tests
git checkout only_or
php run_tests --record # record results against MyISAM table
php run_tests --debug | tee only_or.txt #compare to CS table
Examine only_or.txt and you will find that the | operator returns wrong results for CS compared to MyISAM in 712 of 2186 tests.



 Comments   
Comment by Richard Stracke [ 2019-04-18 ]
  1. Looks like you failed 721 tests of 2186.

With Columnstore 1.2.3 and InnoDB as comparing engine.

Comment by David Hall (Inactive) [ 2019-07-17 ]

This appears to only break on the edge, such as i1 = max(type) – Columnstore max, that is.

In the following, you can see using i1 results in NULL, while using a constant gives the correct result.
MariaDB [test]> select i1, -126 | i1 from fact where i1 = 126;
---------------+

i1 -126 i1

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

126 NULL

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

MariaDB [test]> select i1, -126 | 126 from fact where i1 = 126;
--------------------------+

i1 -126 126

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

126 18446744073709551614

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

Comment by David Hall (Inactive) [ 2019-07-31 ]

A goodly number of these are caused by maxing out the integer field. Any value that happens to be our magic NULL number gets reported as NULL, rather than that value.

Other issues include:

1) Not handling string constants containing numbers correctly. Corrected.
2) Decimals with > 9 decimal digits cause integer overflow in an internal calculation. Corrected.
3) Decimal Constants > Columnstore's decimal limit. Not corrected.
4) For certain float values with large exponents, it gets a different answer than InnoDB. Not corrected.

Comment by David Hall (Inactive) [ 2019-07-31 ]

Fixed some things, but not all. This can be closed, but I don't know how to handle a partial fix.

Comment by Andrew Hutchings (Inactive) [ 2019-08-09 ]

Changes won't compile

Comment by David Hall (Inactive) [ 2019-08-22 ]

Fixed compile errors

Comment by David Hall (Inactive) [ 2019-12-10 ]

1) For Decimal Constants too large, this will be handled by MCOL-641 Full DECIMAL support.
2) Fixing float inaccuracies is difficult to impossible. These micro variations are considered acceptable.

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

Build verified: 1.2.6-1

engine commit:
d4173ef

Verified the fix for NULL output.

Micro variance for float are expected.

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