[MDEV-16885] A method of CASE searched/simple detection Created: 2018-08-02  Updated: 2018-10-11  Resolved: 2018-10-11

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.11, 10.4.0

Type: Task Priority: Critical
Reporter: Andrew Hutchings (Inactive) Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-1790 Implement new CASE item type detection Closed
relates to MDEV-17411 Wrong WHERE optimization with simple ... Closed

 Description   

MariaDB changed to using separate classes for simple/searched in 10.3. ColumnStore needs to figure out which is being used. We would consider something like using dynamic_cast on the item but the server has no-rtti so this fails.

Instead can we please have a virtual function in Item_func_case similar to this?

virtual const char* case_type()= 0;

This would return something like "simple" for simple classes and "searched" for searched classes.



 Comments   
Comment by Alexander Barkov [ 2018-10-11 ]

The patch for MDEV-17411 solved this.

Use this condition to detect simple or searched CASE:

if (item_func->functype() == CASE_SEARCHED_FUNC)
{
  // handle searched CASE
}
if (item_func->functype() == CASE_SIMPLE_FUNC)
{
  // handle searched CASE
}

Generated at Thu Feb 08 08:32:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.