1
0
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:
Leonid Fedorov
2025-05-30 14:05:21 +04:00
committed by GitHub
parent 06ae3c8d6a
commit aa7e0fb9b4
176 changed files with 557 additions and 19155 deletions

View File

@ -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;