You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
@ -39,7 +39,6 @@
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "exceptclasses.h"
|
||||
#include "dataconvert.h"
|
||||
|
||||
namespace messageqcpp {
|
||||
class ByteStream;
|
||||
}
|
||||
@ -483,8 +482,24 @@ inline const std::string& TreeNode::getStrVal()
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%e", fResult.floatVal);
|
||||
fResult.strVal = tmp;
|
||||
// MCOL-299 Print scientific with 5 mantissa and no + sign for exponent
|
||||
int exponent = (int)floor(log10( fabs(fResult.floatVal))); // This will round down the exponent
|
||||
double base = fResult.floatVal * pow(10, -1.0*exponent);
|
||||
if (isnan(exponent) || isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.floatVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%.5f", base);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
snprintf(tmp, 312, "e%02d", exponent);
|
||||
fResult.strVal += tmp;
|
||||
}
|
||||
|
||||
// snprintf(tmp, 312, "%e.5", fResult.floatVal);
|
||||
// fResult.strVal = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -499,8 +514,23 @@ inline const std::string& TreeNode::getStrVal()
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%e", fResult.doubleVal);
|
||||
fResult.strVal = tmp;
|
||||
// MCOL-299 Print scientific with 9 mantissa and no + sign for exponent
|
||||
int exponent = (int)floor(log10( fabs(fResult.doubleVal))); // This will round down the exponent
|
||||
double base = fResult.doubleVal * pow(10, -1.0*exponent);
|
||||
if (isnan(exponent) || isnan(base))
|
||||
{
|
||||
snprintf(tmp, 312, "%f", fResult.doubleVal);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp, 312, "%.9f", base);
|
||||
fResult.strVal = removeTrailing0(tmp, 312);
|
||||
snprintf(tmp, 312, "e%02d", exponent);
|
||||
fResult.strVal += tmp;
|
||||
}
|
||||
// snprintf(tmp, 312, "%e", fResult.doubleVal);
|
||||
// fResult.strVal = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2326,7 +2326,7 @@ void processStatusMSG(messageqcpp::IOSocket* cfIos)
|
||||
log.writeLog(__LINE__, "statusControl: Set Process " + moduleName + "/" + processName + + " State = " + oamState[state] + " PID = " + oam.itoa(PID), LOG_TYPE_DEBUG);
|
||||
|
||||
//update table
|
||||
if ( state < STATE_MAX )
|
||||
if ( state < PID_UPDATE )
|
||||
fShmProcessStatus[shmIndex].ProcessOpState = state;
|
||||
if ( PID != 1 )
|
||||
fShmProcessStatus[shmIndex].ProcessID = PID;
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include <stdint.h>
|
||||
using namespace std;
|
||||
|
||||
#include "functor_real.h"
|
||||
@ -56,6 +58,12 @@ int64_t Func_div::getIntVal(rowgroup::Row& row,
|
||||
return 0;
|
||||
}
|
||||
int64_t int_val1 = (int64_t)(val1 > 0 ? val1 + 0.5 : val1 - 0.5);
|
||||
// MCOL-176 If abs(int_val2) is small enough (like -1), then, this may cause overflow.
|
||||
// This kludge stops the crash.
|
||||
if (int_val1 == INT64_MIN)
|
||||
{
|
||||
--int_val1;
|
||||
}
|
||||
return int_val1 / int_val2;
|
||||
}
|
||||
|
||||
|
@ -203,12 +203,14 @@
|
||||
Name="Source Files"
|
||||
Filters="*.c;*.C;*.cc;*.cpp;*.cp;*.cxx;*.c++;*.prg;*.pas;*.dpr;*.asm;*.s;*.bas;*.java;*.cs;*.sc;*.e;*.cob;*.html;*.rc;*.tcl;*.py;*.pl;*.d">
|
||||
<F N="joiner.cpp"/>
|
||||
<F N="joinpartition.cpp"/>
|
||||
<F N="tuplejoiner.cpp"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="Header Files"
|
||||
Filters="*.h;*.H;*.hh;*.hpp;*.hxx;*.inc;*.sh;*.cpy;*.if">
|
||||
<F N="joiner.h"/>
|
||||
<F N="joinpartition.h"/>
|
||||
<F N="tuplejoiner.h"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
|
@ -211,6 +211,32 @@
|
||||
<F N="messageqcpp/srv.cpp"/>
|
||||
<F N="messageqcpp/tdriver.cpp"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="querystats"
|
||||
Filters="">
|
||||
<F N="querystats/querystats.cpp"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="windowfunction"
|
||||
Filters="">
|
||||
<F N="windowfunction/framebound.cpp"/>
|
||||
<F N="windowfunction/frameboundrange.cpp"/>
|
||||
<F N="windowfunction/frameboundrow.cpp"/>
|
||||
<F N="windowfunction/idborderby.cpp"/>
|
||||
<F N="windowfunction/wf_count.cpp"/>
|
||||
<F N="windowfunction/wf_lead_lag.cpp"/>
|
||||
<F N="windowfunction/wf_min_max.cpp"/>
|
||||
<F N="windowfunction/wf_nth_value.cpp"/>
|
||||
<F N="windowfunction/wf_ntile.cpp"/>
|
||||
<F N="windowfunction/wf_percentile.cpp"/>
|
||||
<F N="windowfunction/wf_ranking.cpp"/>
|
||||
<F N="windowfunction/wf_row_number.cpp"/>
|
||||
<F N="windowfunction/wf_stats.cpp"/>
|
||||
<F N="windowfunction/wf_sum_avg.cpp"/>
|
||||
<F N="windowfunction/windowframe.cpp"/>
|
||||
<F N="windowfunction/windowfunction.cpp"/>
|
||||
<F N="windowfunction/windowfunctiontype.cpp"/>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="Header Files"
|
||||
@ -229,6 +255,32 @@
|
||||
<F N="messageqcpp/socketclosed.h"/>
|
||||
<F N="messageqcpp/socketparms.h"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="querystats headers"
|
||||
Filters="">
|
||||
<F N="querystats/querystats.h"/>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="windowfunction headers"
|
||||
Filters="">
|
||||
<F N="windowfunction/framebound.h"/>
|
||||
<F N="windowfunction/frameboundrange.h"/>
|
||||
<F N="windowfunction/frameboundrow.h"/>
|
||||
<F N="windowfunction/idborderby.h"/>
|
||||
<F N="windowfunction/wf_count.h"/>
|
||||
<F N="windowfunction/wf_lead_lag.h"/>
|
||||
<F N="windowfunction/wf_min_max.h"/>
|
||||
<F N="windowfunction/wf_nth_value.h"/>
|
||||
<F N="windowfunction/wf_ntile.h"/>
|
||||
<F N="windowfunction/wf_percentile.h"/>
|
||||
<F N="windowfunction/wf_ranking.h"/>
|
||||
<F N="windowfunction/wf_row_number.h"/>
|
||||
<F N="windowfunction/wf_stats.h"/>
|
||||
<F N="windowfunction/wf_sum_avg.h"/>
|
||||
<F N="windowfunction/windowframe.h"/>
|
||||
<F N="windowfunction/windowfunction.h"/>
|
||||
<F N="windowfunction/windowfunctiontype.h"/>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder
|
||||
Name="Resource Files"
|
||||
|
Reference in New Issue
Block a user