[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; MariaDB [mytest]> insert into i1 values (null, null); MariaDB [mytest]> select char(c1), char(2) from i1;
--------- --------- Columnstore: MariaDB [mytest]> create table c1 (c1 int, c2 char(3)) engine=columnstore; MariaDB [mytest]> insert into c1 values (null, null); MariaDB [mytest]> select char(c1), char(2) from c1;
---------
--------- 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 | ||||||||
| 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. |