[MCOL-3949] IF() is incorrect when using hex constant Created: 2020-04-16 Updated: 2020-11-12 Resolved: 2020-04-20 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.5.3 |
| Fix Version/s: | 1.5.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Roman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2020-7 |
| Description |
|
Consider the following:
This returns r_regionkey+10, even though all r_regionkey are < 5. Replacing 0x40000000 with it's base 10 equivalent (1073741824) does not exhibit the bug. Debugging shows that the constant column is malformed when it reaches the IF function. This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct. |
| Comments |
| Comment by David Hall (Inactive) [ 2020-04-16 ] | ||||||||||||
|
This regression is caught by working_tpch1/misc/CCBillEU.sql which contains the query
| ||||||||||||
| Comment by David Hall (Inactive) [ 2020-04-17 ] | ||||||||||||
|
QA:
------
------ After the patch:
------
------ | ||||||||||||
| Comment by David Hall (Inactive) [ 2020-04-17 ] | ||||||||||||
|
Server has changed the way type_handler works so our use of it failed, causing the wrong execution path in gp_walk() with the case Item::CONST_ITEM, Item::STRING_RESULT. The same change was needed in buildReturnedColumn(). |