You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
1. For BETWEEN/IN functions in the SELECT clause, build a function column
2. CASE function should return false when it evaluates to NULL (e.g. due to absense of ELSE clause) 3. Set the operation type of IN function to varchar if all parameters are char/varchar/text
This commit is contained in:
@ -315,7 +315,6 @@ CalpontSystemCatalog::ColType Func_in::operationType( FunctionParm& fp, CalpontS
|
||||
ct = fp[0]->data()->resultType();
|
||||
|
||||
bool allString = true;
|
||||
bool allNonToken = true;
|
||||
|
||||
for (uint32_t i = 0; i < fp.size(); i++)
|
||||
{
|
||||
@ -328,31 +327,14 @@ CalpontSystemCatalog::ColType Func_in::operationType( FunctionParm& fp, CalpontS
|
||||
op.setOpType(ct, fp[i]->data()->resultType());
|
||||
ct = op.operationType();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((fp[i]->data()->resultType().colDataType == CalpontSystemCatalog::CHAR &&
|
||||
fp[i]->data()->resultType().colWidth > 8) ||
|
||||
(fp[i]->data()->resultType().colDataType == CalpontSystemCatalog::VARCHAR &&
|
||||
fp[i]->data()->resultType().colWidth >= 8) ||
|
||||
(fp[i]->data()->resultType().colDataType == CalpontSystemCatalog::TEXT &&
|
||||
fp[i]->data()->resultType().colWidth >= 8))
|
||||
allNonToken = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (allString && !allNonToken)
|
||||
if (allString)
|
||||
{
|
||||
ct.colDataType = CalpontSystemCatalog::VARCHAR;
|
||||
ct.colWidth = 255;
|
||||
}
|
||||
|
||||
else if (allString && allNonToken)
|
||||
{
|
||||
ct.colDataType = CalpontSystemCatalog::BIGINT;
|
||||
ct.colWidth = 8;
|
||||
}
|
||||
|
||||
|
||||
// convert date const value according to the compare type here.
|
||||
if (op.operationType().colDataType == CalpontSystemCatalog::DATE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user