1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4666 Empty set when using BIT OR and BIT AND functions in WHERE

This commit is contained in:
Alexander Barkov
2021-04-05 18:09:36 +04:00
parent a3db5bde36
commit a6a85d157d
11 changed files with 111 additions and 44 deletions

View File

@ -50,15 +50,6 @@ namespace
using namespace funcexp;
void bitWiseExceptionHandler(const std::string& funcName,
const CalpontSystemCatalog::ColType& colType)
{
std::ostringstream oss;
oss << funcName << ": datatype of " << execplan::colDataTypeToString(colType.colDataType);
throw logging::IDBExcept(oss.str(), ERR_DATATYPE_NOT_SUPPORT);
}
bool validateBitOperandTypeOrError(execplan::FunctionColumn &col,
const Func & func,
uint argno)
@ -66,7 +57,7 @@ bool validateBitOperandTypeOrError(execplan::FunctionColumn &col,
auto & type = col.functionParms()[argno]->data()->resultType();
if (type.canReturnXInt64())
return false;
bitWiseExceptionHandler(func.funcName(), type);
func.raiseIllegalParameterDataTypeError(type);
return true;
}

View File

@ -262,8 +262,6 @@ void FuncExp::evaluate(rowgroup::Row& row, std::vector<execplan::SRCP>& expressi
{
isNull = false;
expression[i]->fixIfNeeded();
switch (expression[i]->resultType().colDataType)
{
case CalpontSystemCatalog::DATE:

View File

@ -84,6 +84,16 @@ public:
fTimeZone = timeZone;
}
void raiseIllegalParameterDataTypeError(const execplan::CalpontSystemCatalog::ColType& colType) const
{
std::ostringstream oss;
oss << "Illegal parameter data type "
<< execplan::colDataTypeToString(colType.colDataType)
<< " for operation "
<< funcName();
throw logging::IDBExcept(oss.str(), logging::ERR_DATATYPE_NOT_SUPPORT);
}
virtual bool fix(execplan::FunctionColumn &col) const
{
return false;