You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-1983 Reject non-numeric arguments for regr_*** functions that require numeric
This commit is contained in:
@@ -55,6 +55,13 @@ mcsv1_UDAF::ReturnCode covar_pop::init(mcsv1Context* context,
|
||||
context->setErrorMessage("covar_pop() with other than 2 arguments");
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
if (!(isNumeric(colTypes[0].dataType) && isNumeric(colTypes[1].dataType)))
|
||||
{
|
||||
// The error message will be prepended with
|
||||
// "The storage engine for the table doesn't support "
|
||||
context->setErrorMessage("covar_pop() with non-numeric arguments");
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(covar_pop_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
|
Reference in New Issue
Block a user