[MCOL-351] logical or resolves to null for some negative cases Created: 2016-10-07  Updated: 2016-11-08  Resolved: 2016-11-08

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

Type: Bug Priority: Major
Reporter: David Thompson (Inactive) Assignee: Andrew Hutchings (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Blocks
blocks MCOL-174 | operator returns wrong results in 7... Closed
Duplicate
duplicates MCOL-92 Support full numeric ranges for all d... Closed

 Description   

under certain circumstances seems to be based on negative input values, logical or returns null rather than a value, to repro:

mcsmysql> create table test (i1 int) engine=columnstore;
sh> seq -126 127 > numbers.txt
sh> usr/local/mariadb/columnstore/bin/cpimport test test /home/david/numbers.txt
mcsmysql> select i1, 126 | i1 from test;

You'll see that for every other negative number the expression is null. In myisam it returns a large double number. This can be tested using similar table and an LDI to load the data:

 create table test_isam (i1 int);
load data infile '/home/david/numbers.txt' into table test_isam;



 Comments   
Comment by David Thompson (Inactive) [ 2016-10-07 ]

This happens with different behavior for different constant values as well.

Comment by Andrew Hutchings (Inactive) [ 2016-11-08 ]

The reason for this is the column gets cast as a 64bit unsigned int. The resulting 'or' for even numbers therefore turns into 0xffffffffffffffe which equates to NULL, this is the same behaviour as MyISAM but MyISAM doesn't have that as a magic number. The behaviour for ColumnStore is correct given our documented ranges. This is therefore a duplicate of MCOL-92.

Comment by Andrew Hutchings (Inactive) [ 2016-11-08 ]

Closing as duplicate due to explanation of issue.

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