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
Deep build refactoring phase 1 (#3562)
* configcpp refactored * logging and datatypes refactored * more dataconvert * chore(build): massive removals, auto add files to debian install file * chore(codemanagement): nodeps headers, potentioal library * chore(build): configure before autobake * chore(build): use custom cmake commands for components, mariadb-plugin-columnstore.install generated * chore(build): install deps as separate step for build-packages * more deps * check debian/mariadb-plugin-columnstore.install automatically * chore(build): add option for multibracnh compilation * Fix warning
This commit is contained in:
@ -27,10 +27,13 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include "basic/string_utils.h"
|
||||
|
||||
#include <boost/tokenizer.hpp>
|
||||
using namespace boost;
|
||||
|
||||
#include "basic/string_utils.h"
|
||||
|
||||
#include "bytestream.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
#include "constantcolumn.h"
|
||||
@ -398,23 +401,32 @@ void WindowFunctionColumn::adjustResultType()
|
||||
{
|
||||
if ((fResultType.colDataType == CalpontSystemCatalog::DECIMAL ||
|
||||
fResultType.colDataType == CalpontSystemCatalog::UDECIMAL) &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "COUNT") && !datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "COUNT(*)") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "ROW_NUMBER") && !datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "RANK") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "PERCENT_RANK") && !datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "DENSE_RANK") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "CUME_DIST") && !datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "NTILE") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "COUNT") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "COUNT(*)") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "ROW_NUMBER") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "RANK") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "PERCENT_RANK") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "DENSE_RANK") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "CUME_DIST") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "NTILE") &&
|
||||
!datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "PERCENTILE") && !fFunctionParms.empty() &&
|
||||
fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::DOUBLE)
|
||||
fResultType = fFunctionParms[0]->resultType();
|
||||
|
||||
if ((datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LEAD") || datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LAG") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "MIN") || datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "MAX") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "FIRST_VALUE") || datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LAST_VALUE") ||
|
||||
if ((datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LEAD") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LAG") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "MIN") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "MAX") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "FIRST_VALUE") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "LAST_VALUE") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "NTH_VALUE")) &&
|
||||
!fFunctionParms.empty())
|
||||
fResultType = fFunctionParms[0]->resultType();
|
||||
|
||||
if (datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "SUM") || datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "AVG") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "AVG_DISTINCT") || datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "PERCENTILE"))
|
||||
if (datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "SUM") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "AVG") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "AVG_DISTINCT") ||
|
||||
datatypes::ASCIIStringCaseInsensetiveEquals(fFunctionName, "PERCENTILE"))
|
||||
{
|
||||
if (fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::DECIMAL ||
|
||||
fFunctionParms[0]->resultType().colDataType == CalpontSystemCatalog::UDECIMAL)
|
||||
@ -531,7 +543,7 @@ void WindowFunctionColumn::evaluate(Row& row, bool& isNull)
|
||||
fResult.strVal.assign(str.unsafeStringRef());
|
||||
|
||||
// stringColVal is padded with '\0' to colWidth so can't use str.length()
|
||||
//if (strlen(fResult.strVal.str()) == 0)
|
||||
// if (strlen(fResult.strVal.str()) == 0)
|
||||
// isNull = true;
|
||||
|
||||
break;
|
||||
|
Reference in New Issue
Block a user