[MCOL-4125] function CHAR may erroneously report NULL. Created: 2020-06-29  Updated: 2020-07-10  Resolved: 2020-07-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.5.2
Fix Version/s: 1.5.3

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


 Description   

CHAR should ignore NULL values in the parameter list, but it sets isNull if a NULL value is found.



 Comments   
Comment by Daniel Lee (Inactive) [ 2020-07-09 ]

Build tests: 1.5.3-1 (drone build #288)

I got results that is different from innodb table

innodb:

MariaDB [mytest]> create table i1 (c1 int, c2 char(3)) engine=innodb;
Query OK, 0 rows affected (0.024 sec)

MariaDB [mytest]> insert into i1 values (null, null);
Query OK, 1 row affected (0.004 sec)

MariaDB [mytest]> select char(c1), char(2) from i1;
-----------------+

char(c1) char(2)

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

   

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

Columnstore:

MariaDB [mytest]> create table c1 (c1 int, c2 char(3)) engine=columnstore;
Query OK, 0 rows affected (0.216 sec)

MariaDB [mytest]> insert into c1 values (null, null);
Query OK, 1 row affected (0.375 sec)

MariaDB [mytest]> select char(c1), char(2) from c1;
-----------------+

char(c1) char(2)

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

NULL  

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

The above results is identical to that from 1.5.2-1

Comment by David Hall (Inactive) [ 2020-07-10 ]

This is not a bug in the CHAR function, but rather a manifestation of MCOL-271 – empty string values get reported as NULL. There's nothing we can do about it for this JIRA.
Test where there are more values besides the NULL entries.

Comment by Daniel Lee (Inactive) [ 2020-07-10 ]

In that case, why there is a PR and why sent it to QA for verification?

Comment by Daniel Lee (Inactive) [ 2020-07-10 ]

The NULL value returned is expected because ColumnStore currently treat empty string as NULL.

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