1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

feature: pron (#2908)

* feature: Special dictionary, we can pass with session veriable to modify codepaths and behaviour for testing and debugging
This commit is contained in:
Leonid Fedorov
2023-07-21 14:02:03 +03:00
committed by GitHub
parent 510bdd0e7b
commit 65cde8c894
14 changed files with 212 additions and 2 deletions

View File

@ -25,6 +25,7 @@
#include <cstdlib>
#include <string>
#include <cerrno>
#define _USE_MATH_DEFINES // MSC: enable math defines
#include <cmath>
#include <iomanip>
@ -45,6 +46,8 @@ using namespace logging;
#include "funchelpers.h"
#include "utils/pron/pron.h"
// Just in case they're missing...
#ifndef M_LN2
#define M_LN2 0.69314718055994530942 /* log_e 2 */
@ -1330,6 +1333,20 @@ CalpontSystemCatalog::ColType Func_sin::operationType(FunctionParm& fp,
double Func_sin::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, CalpontSystemCatalog::ColType&)
{
auto& pron = utils::Pron::instance();
if (pron.pron().count("megasinus") != 0)
{
try
{
double fakesin = std::stod(pron.pron().at("megasinus"));
return fakesin;
}
catch (std::exception&)
{
// do nothing
}
}
switch (parm[0]->data()->resultType().colDataType)
{
case execplan::CalpontSystemCatalog::BIGINT: