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

chore(build): fixes to satisfy clang19 warnings

This commit is contained in:
Leonid Fedorov
2025-05-08 15:26:36 +00:00
committed by Leonid Fedorov
parent 9fd7f342a7
commit a0bee173f6
334 changed files with 3062 additions and 3323 deletions

View File

@ -95,11 +95,8 @@ class fileBlockRequestQueue
uint32_t readersWaiting;
private:
// do not implement
fileBlockRequestQueue(const fileBlockRequestQueue& Q)
{
}
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue& Q);
fileBlockRequestQueue(const fileBlockRequestQueue&) = delete;
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue&) = delete;
/**
* @brief pointer to the next request to be popped from the queue

View File

@ -18,7 +18,7 @@
#include <iostream>
#include <sstream>
//#define NDEBUG
// #define NDEBUG
#include <cassert>
#include <cmath>
#include <functional>
@ -174,7 +174,7 @@ inline bool colCompare_(const T& val1, const T& val2, uint8_t COP)
}
inline bool colCompareStr(const ColRequestHeaderDataType& type, uint8_t COP, const utils::ConstString& val1,
const utils::ConstString& val2, const bool printOut = false)
const utils::ConstString& val2, const bool /*printOut*/ = false)
{
int error = 0;
bool rc = primitives::StringComparator(type).op(&error, COP, val1, val2);
@ -283,8 +283,8 @@ inline bool isMinMaxValid(const NewColRequestHeader* in)
template <ENUM_KIND KIND, int COL_WIDTH, bool IS_NULL, typename T1, typename T2,
typename std::enable_if<COL_WIDTH == sizeof(int32_t) && KIND == KIND_FLOAT && !IS_NULL, T1>::type* =
nullptr>
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
const ColRequestHeaderDataType& typeHolder, T1 nullValue)
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t /*rf*/,
const ColRequestHeaderDataType& /*typeHolder*/, T1 /*nullValue*/)
{
float dVal1 = *((float*)&columnValue);
float dVal2 = *((float*)&filterValue);
@ -294,8 +294,8 @@ inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, u
template <ENUM_KIND KIND, int COL_WIDTH, bool IS_NULL, typename T1, typename T2,
typename std::enable_if<COL_WIDTH == sizeof(int64_t) && KIND == KIND_FLOAT && !IS_NULL, T1>::type* =
nullptr>
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
const ColRequestHeaderDataType& typeHolder, T1 nullValue)
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t /*rf*/,
const ColRequestHeaderDataType& /*typeHolder*/, T1 /*nullValue*/)
{
double dVal1 = *((double*)&columnValue);
double dVal2 = *((double*)&filterValue);
@ -346,7 +346,7 @@ inline bool isNullValue(const T val, const T NULL_VALUE)
template <ENUM_KIND KIND, int COL_WIDTH, bool IS_NULL, typename T1, typename T2,
typename std::enable_if<IS_NULL, T1>::type* = nullptr>
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
const ColRequestHeaderDataType& typeHolder, T1 nullValue)
const ColRequestHeaderDataType& /*typeHolder*/, T1 nullValue)
{
const bool isVal2Null = isNullValue<KIND, T2>(filterValue, (T2)nullValue);
@ -375,7 +375,7 @@ inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, u
template <ENUM_KIND KIND, int COL_WIDTH, bool IS_NULL, typename T1, typename T2,
typename std::enable_if<KIND == KIND_UNSIGNED && !IS_NULL, T1>::type* = nullptr>
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
const ColRequestHeaderDataType& typeHolder, T1 nullValue)
const ColRequestHeaderDataType& /*typeHolder*/, T1 nullValue)
{
const bool isVal2Null = isNullValue<KIND, T2>(filterValue, (T2)nullValue);
@ -394,7 +394,7 @@ inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, u
template <ENUM_KIND KIND, int COL_WIDTH, bool IS_NULL, typename T1, typename T2,
typename std::enable_if<KIND == KIND_DEFAULT && !IS_NULL, T1>::type* = nullptr>
inline bool colCompareDispatcherT(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
const ColRequestHeaderDataType& typeHolder, T1 nullValue)
const ColRequestHeaderDataType& /*typeHolder*/, T1 nullValue)
{
const bool isVal2Null = isNullValue<KIND, T2>(filterValue, (T2)nullValue);
@ -428,7 +428,7 @@ inline bool colCompare(T1 columnValue, T2 filterValue, uint8_t cop, uint8_t rf,
// Bit pattern representing EMPTY value for given column type/width
// TBD Use typeHandler
template <typename T, typename std::enable_if<sizeof(T) == sizeof(int128_t), T>::type* = nullptr>
T getEmptyValue(uint8_t type)
T getEmptyValue(uint8_t /*type*/)
{
return datatypes::Decimal128Empty;
}
@ -526,7 +526,8 @@ T getEmptyValue(uint8_t type)
//
template <bool IS_NULL, typename T, typename FT, typename std::enable_if<IS_NULL == true, T>::type* = nullptr>
inline bool noneValuesInArray(const T curValue, const FT* filterValues, const uint32_t filterCount)
inline bool noneValuesInArray(const T /*curValue*/, const FT* /*filterValues*/,
const uint32_t /*filterCount*/)
{
// ignore NULLs in the array and in the column data
return false;
@ -546,7 +547,7 @@ inline bool noneValuesInArray(const T curValue, const FT* filterValues, const ui
}
template <bool IS_NULL, typename T, typename ST, typename std::enable_if<IS_NULL == true, T>::type* = nullptr>
inline bool noneValuesInSet(const T curValue, const ST* filterSet)
inline bool noneValuesInSet(const T /*curValue*/, const ST* /*filterSet*/)
{
// bug 1920: ignore NULLs in the set and in the column data
return false;
@ -589,9 +590,8 @@ inline bool matchingColValue(
{
auto filterValue = filterValues[0];
// This can be future optimized checking if a filterValue is NULL or not
bool cmp =
colCompare<KIND, COL_WIDTH, IS_NULL>(curValue, filterValue, filterCOPs[0], filterRFs[0], typeHolder,
NULL_VALUE);
bool cmp = colCompare<KIND, COL_WIDTH, IS_NULL>(curValue, filterValue, filterCOPs[0], filterRFs[0],
typeHolder, NULL_VALUE);
return cmp;
}
@ -604,8 +604,7 @@ inline bool matchingColValue(
// This can be future optimized checking if a filterValues are NULLs or not before the higher level
// loop.
bool cmp = colCompare<KIND, COL_WIDTH, IS_NULL>(curValue, filterValue, filterCOPs[argIndex],
filterRFs[argIndex], typeHolder,
NULL_VALUE);
filterRFs[argIndex], typeHolder, NULL_VALUE);
// Short-circuit the filter evaluation - true || ... == true
if (cmp == true)
@ -625,8 +624,7 @@ inline bool matchingColValue(
// This can be future optimized checking if a filterValues are NULLs or not before the higher level
// loop.
bool cmp = colCompare<KIND, COL_WIDTH, IS_NULL>(curValue, filterValue, filterCOPs[argIndex],
filterRFs[argIndex], typeHolder,
NULL_VALUE);
filterRFs[argIndex], typeHolder, NULL_VALUE);
// Short-circuit the filter evaluation - false && ... = false
if (cmp == false)
@ -648,8 +646,7 @@ inline bool matchingColValue(
// This can be future optimized checking if a filterValues are NULLs or not before the higher level
// loop.
bool cmp = colCompare<KIND, COL_WIDTH, IS_NULL>(curValue, filterValue, filterCOPs[argIndex],
filterRFs[argIndex], typeHolder,
NULL_VALUE);
filterRFs[argIndex], typeHolder, NULL_VALUE);
result ^= cmp;
}
@ -694,7 +691,8 @@ template <ENUM_KIND KIND, typename T, typename std::enable_if<KIND == KIND_TEXT,
inline void updateMinMax(T& Min, T& Max, const T curValue, NewColRequestHeader* in)
{
constexpr int COL_WIDTH = sizeof(T);
const T DUMMY_NULL_VALUE = ~curValue; // it SHALL NOT be equal to curValue, other constraints do not matter.
const T DUMMY_NULL_VALUE =
~curValue; // it SHALL NOT be equal to curValue, other constraints do not matter.
if (colCompare<KIND_TEXT, COL_WIDTH>(Min, curValue, COMPARE_GT, false, in->colType, DUMMY_NULL_VALUE))
Min = curValue;
@ -703,7 +701,7 @@ inline void updateMinMax(T& Min, T& Max, const T curValue, NewColRequestHeader*
}
template <ENUM_KIND KIND, typename T, typename std::enable_if<KIND != KIND_TEXT, T>::type* = nullptr>
inline void updateMinMax(T& Min, T& Max, const T curValue, NewColRequestHeader* in)
inline void updateMinMax(T& Min, T& Max, const T curValue, NewColRequestHeader* /*in*/)
{
if (Min > curValue)
Min = curValue;
@ -723,20 +721,20 @@ T getInitialMin(NewColRequestHeader* in)
}
template <ENUM_KIND KIND, typename T, typename std::enable_if<KIND != KIND_TEXT, T>::type* = nullptr>
T getInitialMin(NewColRequestHeader* in)
T getInitialMin(NewColRequestHeader* /*in*/)
{
return datatypes::numeric_limits<T>::max();
}
template <ENUM_KIND KIND, typename T,
typename std::enable_if<KIND != KIND_TEXT && KIND != KIND_UNSIGNED, T>::type* = nullptr>
T getInitialMax(NewColRequestHeader* in)
T getInitialMax(NewColRequestHeader* /*in*/)
{
return datatypes::numeric_limits<T>::min();
}
template <ENUM_KIND KIND, typename T, typename std::enable_if<KIND == KIND_UNSIGNED, T>::type* = nullptr>
T getInitialMax(NewColRequestHeader* in)
T getInitialMax(NewColRequestHeader* /*in*/)
{
return 0;
}
@ -900,8 +898,8 @@ inline void vectUpdateMinMax(const bool validMinMax, const bool isNonNullOrEmpty
// This happens if in->NVALS > 0(HAS_INPUT_RIDS is set).
template <typename T, ENUM_KIND KIND, bool HAS_INPUT_RIDS,
typename std::enable_if<HAS_INPUT_RIDS == true, T>::type* = nullptr>
inline void vectUpdateMinMax(const bool validMinMax, const bool isNonNullOrEmpty, T& Min, T& Max, T curValue,
NewColRequestHeader* in)
inline void vectUpdateMinMax(const bool /*validMinMax*/, const bool /*isNonNullOrEmpty*/, T& /*Min*/,
T& /*Max*/, T /*curValue*/, NewColRequestHeader* /*in*/)
{
//
}
@ -910,7 +908,8 @@ template <typename T, bool HAS_INPUT_RIDS,
typename std::enable_if<HAS_INPUT_RIDS == false, T>::type* = nullptr>
void vectWriteColValuesLoopRIDAsignment(primitives::RIDType* ridDstArray, ColResultHeader* out,
const primitives::RIDType calculatedRID,
const primitives::RIDType* ridSrcArray, const uint32_t srcRIDIdx)
const primitives::RIDType* /*ridSrcArray*/,
const uint32_t /*srcRIDIdx*/)
{
*ridDstArray = calculatedRID;
out->RidFlags |= (1 << (calculatedRID >> 9)); // set the (row/512)'th bit
@ -919,7 +918,7 @@ void vectWriteColValuesLoopRIDAsignment(primitives::RIDType* ridDstArray, ColRes
template <typename T, bool HAS_INPUT_RIDS,
typename std::enable_if<HAS_INPUT_RIDS == true, T>::type* = nullptr>
void vectWriteColValuesLoopRIDAsignment(primitives::RIDType* ridDstArray, ColResultHeader* out,
const primitives::RIDType calculatedRID,
const primitives::RIDType /*calculatedRID*/,
const primitives::RIDType* ridSrcArray, const uint32_t srcRIDIdx)
{
*ridDstArray = ridSrcArray[srcRIDIdx];
@ -933,18 +932,19 @@ template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INP
typename std::enable_if<OUTPUT_TYPE&(OT_TOKEN | OT_DATAVALUE) && !(OUTPUT_TYPE & OT_RID),
T>::type* = nullptr>
inline uint16_t vectWriteColValues(
VT& simdProcessor, // SIMD processor
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
const bool validMinMax, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
char* dstArray, // the actual char dst array ptr to start writing values
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
ColResultHeader* out, // Proto message
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
VT& /*simdProcessor*/, // SIMD processor
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType /*ridOffset*/, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
char* dstArray, // the actual char dst array ptr to start writing values
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* /*out*/, // Proto message
primitives::RIDType* /*ridDstArray*/, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* /*ridSrcArray*/) // The actual src array ptr to read RIDs
{
constexpr const uint16_t FilterMaskStep = VT::FilterMaskStep;
T* tmpDstVecTPtr = reinterpret_cast<T*>(dstArray);
@ -966,18 +966,19 @@ inline uint16_t vectWriteColValues(
template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INPUT_RIDS,
typename std::enable_if<OUTPUT_TYPE & OT_RID && !(OUTPUT_TYPE & OT_TOKEN), T>::type* = nullptr>
inline uint16_t vectWriteColValues(
VT& simdProcessor, // SIMD processor
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
const bool validMinMax, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
char* dstArray, // the actual char dst array ptr to start writing values
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
ColResultHeader* out, // Proto message
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
VT& /*simdProcessor*/, // SIMD processor
const typename VT::MaskType /*writeMask*/, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType /*ridOffset*/, // The first RID value of the dataVecTPtr
T* /*dataVecTPtr*/, // Typed SIMD vector from the input block
char* /*dstArray*/, // the actual char dst array ptr to start writing values
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* /*out*/, // Proto message
primitives::RIDType* /*ridDstArray*/, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* /*ridSrcArray*/) // The actual src array ptr to read RIDs
{
return 0;
}
@ -986,18 +987,19 @@ inline uint16_t vectWriteColValues(
template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INPUT_RIDS,
typename std::enable_if<OUTPUT_TYPE == OT_BOTH, T>::type* = nullptr>
inline uint16_t vectWriteColValues(
VT& simdProcessor, // SIMD processor
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
const bool validMinMax, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
char* dstArray, // the actual char dst array ptr to start writing values
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
ColResultHeader* out, // Proto message
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
VT& /*simdProcessor*/, // SIMD processor
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
char* dstArray, // the actual char dst array ptr to start writing values
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* out, // Proto message
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
{
constexpr const uint16_t FilterMaskStep = VT::FilterMaskStep;
T* tmpDstVecTPtr = reinterpret_cast<T*>(dstArray);
@ -1026,18 +1028,19 @@ template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INP
typename std::enable_if<!(OUTPUT_TYPE & (OT_TOKEN | OT_DATAVALUE)) && OUTPUT_TYPE & OT_RID,
T>::type* = nullptr>
inline uint16_t vectWriteRIDValues(
VT& processor, // SIMD processor
const uint16_t valuesWritten, // The number of values written to in certain SFINAE cases
const bool validMinMax, // The flag to update Min/Max for a block or not
VT& /*processor*/, // SIMD processor
const uint16_t /*valuesWritten*/, // The number of values written to in certain SFINAE cases
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
T* /*dataVecTPtr*/, // Typed SIMD vector from the input block
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* out, // Proto message
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
{
constexpr const uint16_t FilterMaskStep = VT::FilterMaskStep;
primitives::RIDType* origRIDDstArray = ridDstArray;
@ -1062,18 +1065,19 @@ inline uint16_t vectWriteRIDValues(
template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INPUT_RIDS,
typename std::enable_if<OUTPUT_TYPE == OT_BOTH, T>::type* = nullptr>
inline uint16_t vectWriteRIDValues(
VT& processor, // SIMD processor
const uint16_t valuesWritten, // The number of values written to in certain SFINAE cases
const bool validMinMax, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
ColResultHeader* out, // Proto message
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
VT& /*processor*/, // SIMD processor
const uint16_t valuesWritten, // The number of values written to in certain SFINAE cases
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType /*ridOffset*/, // The first RID value of the dataVecTPtr
T* /*dataVecTPtr*/, // Typed SIMD vector from the input block
primitives::RIDType* /*ridDstArray*/, // The actual dst arrray ptr to start writing RIDs
const typename VT::MaskType /*writeMask*/, // SIMD intrinsics bitmask for values to write
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* /*out*/, // Proto message
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
primitives::RIDType* /*ridSrcArray*/) // The actual src array ptr to read RIDs
{
return valuesWritten;
}
@ -1083,18 +1087,19 @@ template <typename T, typename VT, int OUTPUT_TYPE, ENUM_KIND KIND, bool HAS_INP
typename std::enable_if<OUTPUT_TYPE&(OT_TOKEN | OT_DATAVALUE) && !(OUTPUT_TYPE & OT_RID),
T>::type* = nullptr>
inline uint16_t vectWriteRIDValues(
VT& processor, // SIMD processor
const uint16_t valuesWritten, // The number of values written to in certain SFINAE cases
const bool validMinMax, // The flag to update Min/Max for a block or not
const primitives::RIDType ridOffset, // The first RID value of the dataVecTPtr
T* dataVecTPtr, // Typed SIMD vector from the input block
primitives::RIDType* ridDstArray, // The actual dst arrray ptr to start writing RIDs
const typename VT::MaskType writeMask, // SIMD intrinsics bitmask for values to write
T& Min, T& Max, // Min/Max of the extent
NewColRequestHeader* in, // Proto message
ColResultHeader* out, // Proto message
const typename VT::MaskType nonNullOrEmptyMask, // SIMD intrinsics inverce bitmask for NULL/EMPTY values
primitives::RIDType* ridSrcArray) // The actual src array ptr to read RIDs
VT& /*processor*/, // SIMD processor
const uint16_t valuesWritten, // The number of values written to in certain SFINAE cases
const bool /*validMinMax*/, // The flag to update Min/Max for a block or not
const primitives::RIDType /*ridOffset*/, // The first RID value of the dataVecTPtr
T* /*dataVecTPtr*/, // Typed SIMD vector from the input block
primitives::RIDType* /*ridDstArray*/, // The actual dst arrray ptr to start writing RIDs
const typename VT::MaskType /*writeMask*/, // SIMD intrinsics bitmask for values to write
T& /*Min*/, T& /*Max*/, // Min/Max of the extent
NewColRequestHeader* /*in*/, // Proto message
ColResultHeader* /*out*/, // Proto message
const typename VT::MaskType /*nonNullOrEmptyMask*/, // SIMD intrinsics inverce bitmask for NULL/EMPTY
// values
primitives::RIDType* /*ridSrcArray*/) // The actual src array ptr to read RIDs
{
return valuesWritten;
}
@ -1113,9 +1118,9 @@ void scalarFiltering_(
const uint8_t* filterCOPs, // comparison operation
const FT* filterValues, // value to compare to
const uint8_t* filterRFs,
const ColRequestHeaderDataType& typeHolder, // TypeHolder to use collation-aware ops for char/text.
const T* srcArray, // Input array
const uint32_t srcSize, // ... and its size
const ColRequestHeaderDataType& /*typeHolder*/, // TypeHolder to use collation-aware ops for char/text.
const T* srcArray, // Input array
const uint32_t srcSize, // ... and its size
const uint16_t* ridArray, // Optional array of indexes into srcArray, that defines the read order
const uint16_t ridSize, // ... and its size
const uint32_t initialRID, // The input block idx to start scanning/filter at.
@ -1224,8 +1229,8 @@ void scalarFiltering(
template <typename VT, typename SIMD_WRAPPER_TYPE, bool HAS_INPUT_RIDS, typename T,
typename std::enable_if<HAS_INPUT_RIDS == false, T>::type* = nullptr>
inline SIMD_WRAPPER_TYPE simdDataLoad(VT& processor, const T* srcArray, const T* origSrcArray,
const primitives::RIDType* ridArray, const uint16_t iter)
inline SIMD_WRAPPER_TYPE simdDataLoad(VT& processor, const T* srcArray, const T* /*origSrcArray*/,
const primitives::RIDType* /*ridArray*/, const uint16_t /*iter*/)
{
return {processor.loadFrom(reinterpret_cast<const char*>(srcArray))};
}
@ -1234,8 +1239,8 @@ inline SIMD_WRAPPER_TYPE simdDataLoad(VT& processor, const T* srcArray, const T*
// TODO Move the logic into simd namespace class methods and use intrinsics
template <typename VT, typename SIMD_WRAPPER_TYPE, bool HAS_INPUT_RIDS, typename T,
typename std::enable_if<HAS_INPUT_RIDS == true, T>::type* = nullptr>
inline SIMD_WRAPPER_TYPE simdDataLoad(VT& processor, const T* srcArray, const T* origSrcArray,
const primitives::RIDType* ridArray, const uint16_t iter)
inline SIMD_WRAPPER_TYPE simdDataLoad(VT& /*processor*/, const T* /*srcArray*/, const T* origSrcArray,
const primitives::RIDType* ridArray, const uint16_t /*iter*/)
{
constexpr const uint16_t WIDTH = sizeof(T);
constexpr const uint16_t VECTOR_SIZE = VT::vecByteSize / WIDTH;
@ -1252,7 +1257,7 @@ inline SIMD_WRAPPER_TYPE simdDataLoad(VT& processor, const T* srcArray, const T*
template <ENUM_KIND KIND, typename VT, typename SIMD_WRAPPER_TYPE, typename T,
typename std::enable_if<KIND != KIND_TEXT, T>::type* = nullptr>
inline SIMD_WRAPPER_TYPE simdSwapedOrderDataLoad(const ColRequestHeaderDataType& type, VT& processor,
inline SIMD_WRAPPER_TYPE simdSwapedOrderDataLoad(const ColRequestHeaderDataType& /*type*/, VT& /*processor*/,
typename VT::SimdType& dataVector)
{
return {dataVector};
@ -1260,7 +1265,7 @@ inline SIMD_WRAPPER_TYPE simdSwapedOrderDataLoad(const ColRequestHeaderDataType&
template <ENUM_KIND KIND, typename VT, typename SIMD_WRAPPER_TYPE, typename T,
typename std::enable_if<KIND == KIND_TEXT, T>::type* = nullptr>
inline SIMD_WRAPPER_TYPE simdSwapedOrderDataLoad(const ColRequestHeaderDataType& type, VT& processor,
inline SIMD_WRAPPER_TYPE simdSwapedOrderDataLoad(const ColRequestHeaderDataType& type, VT& /*processor*/,
typename VT::SimdType& dataVector)
{
constexpr const uint16_t WIDTH = sizeof(T);
@ -1311,7 +1316,7 @@ void vectorizedTextUpdateMinMax(const bool validMinMax, const typename VT::MaskT
}
template <typename T, typename VT, typename SimdType>
void extractMinMax(VT& simdProcessor, SimdType simdMin, SimdType simdMax, T& min, T& max)
void extractMinMax(VT& /*simdProcessor*/, SimdType simdMin, SimdType simdMax, T& min, T& max)
{
constexpr const uint16_t size = VT::vecByteSize / sizeof(T);
T* simdMinVec = reinterpret_cast<T*>(&simdMin);
@ -1321,7 +1326,7 @@ void extractMinMax(VT& simdProcessor, SimdType simdMin, SimdType simdMax, T& min
}
template <typename T, typename VT, typename SimdType>
void extractTextMinMax(VT& simdProcessor, SimdType simdMin, SimdType simdMax, SimdType weightsMin,
void extractTextMinMax(VT& /*simdProcessor*/, SimdType simdMin, SimdType simdMax, SimdType weightsMin,
SimdType weightsMax, T& min, T& max)
{
constexpr const uint16_t size = VT::vecByteSize / sizeof(T);
@ -1891,7 +1896,7 @@ template <typename T, typename std::enable_if<sizeof(T) == sizeof(int8_t) || siz
T>::type* = nullptr> // gcc >= 5
#else
sizeof(T) == sizeof(int128_t),
T>::type*> // gcc 4.8.5
T>::type*> // gcc 4.8.5
#endif
#else
sizeof(T) == sizeof(int128_t),
@ -1928,7 +1933,7 @@ template <typename T,
#if ___GNUC__ >= 5
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type* = nullptr> // gcc >= 5
#else
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type*> // gcc 4.8.5
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type*> // gcc 4.8.5
#endif
#else
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type* = nullptr>

View File

@ -469,7 +469,7 @@ class PrimitiveProcessor
// Bit pattern representing NULL value for given column type/width
// TBD Use TypeHandler
template <typename T, typename std::enable_if<sizeof(T) == sizeof(int128_t), T>::type* = nullptr>
T getNullValue(uint8_t type)
T getNullValue(uint8_t /*type*/)
{
return datatypes::Decimal128Null;
}

View File

@ -158,7 +158,7 @@ class BatchPrimitiveProcessor
return touchedBlocks;
}
void setError(const std::string& error, logging::ErrorCodeValues errorCode)
void setError(const std::string& /*error*/, logging::ErrorCodeValues /*errorCode*/)
{
}
@ -203,7 +203,8 @@ class BatchPrimitiveProcessor
void serializeStrings(messageqcpp::SBS& bs);
void asyncLoadProjectColumns();
void writeErrorMsg(messageqcpp::SBS& bs, const std::string& error, uint16_t errCode, bool logIt = true, bool critical = true);
void writeErrorMsg(messageqcpp::SBS& bs, const std::string& error, uint16_t errCode, bool logIt = true,
bool critical = true);
BPSOutputType ot;
@ -308,14 +309,14 @@ class BatchPrimitiveProcessor
bool hasRowGroup;
/* Rowgroups + join */
using TJoiner = std::unordered_multimap<uint64_t, uint32_t, joiner::TupleJoiner::hasher,
std::equal_to<uint64_t>,
utils::STLPoolAllocator<std::pair<const uint64_t, uint32_t>>>;
using TLJoiner = std::unordered_multimap<
joiner::TypelessData, uint32_t, joiner::TupleJoiner::TypelessDataHasher,
joiner::TupleJoiner::TypelessDataComparator,
utils::STLPoolAllocator<std::pair<const joiner::TypelessData, uint32_t>>>;
using TJoiner =
std::unordered_multimap<uint64_t, uint32_t, joiner::TupleJoiner::hasher, std::equal_to<uint64_t>,
utils::STLPoolAllocator<std::pair<const uint64_t, uint32_t>>>;
using TLJoiner =
std::unordered_multimap<joiner::TypelessData, uint32_t, joiner::TupleJoiner::TypelessDataHasher,
joiner::TupleJoiner::TypelessDataComparator,
utils::STLPoolAllocator<std::pair<const joiner::TypelessData, uint32_t>>>;
bool generateJoinedRowGroup(rowgroup::Row& baseRow, const uint32_t depth = 0);
/* generateJoinedRowGroup helper fcns & vars */

View File

@ -39,7 +39,7 @@ void Command::createCommand(ByteStream& bs)
bs >> stepUuid;
}
void Command::resetCommand(ByteStream& bs){};
void Command::resetCommand(ByteStream& /*bs*/) {};
void Command::setMakeAbsRids(bool)
{

View File

@ -57,7 +57,7 @@ class Command
virtual void project(messageqcpp::SBS& bs) = 0;
virtual void projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t columnPosition) = 0;
virtual uint64_t getLBID() = 0;
virtual void getLBIDList(uint32_t loopCount, std::vector<int64_t>* out)
virtual void getLBIDList(uint32_t /*loopCount*/, std::vector<int64_t>* /*out*/)
{
} // the default fcn returns 0 lbids
virtual void nextLBID() = 0;

View File

@ -104,11 +104,11 @@ void DictStep::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void DictStep::resetCommand(ByteStream& bs)
void DictStep::resetCommand(ByteStream& /*bs*/)
{
}
void DictStep::prep(int8_t outputType, bool makeAbsRids)
void DictStep::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
// (at most there are 8192 tokens to fetch)
bufferSize = sizeof(DictInput) + filterString.length() + (8192 * sizeof(OldGetSigParams));
@ -188,14 +188,15 @@ void DictStep::copyResultToTmpSpace(OrderedToken* ot)
pos += 1;
len = *((uint16_t*)pos);
pos += 2;
if (!isnull) {
if (!isnull)
{
ns.assign(pos, len);
}
pos += len;
ot[rid16].str = ns;
//if (rid64 & 0x8000000000000000LL)
// ot[rid16].str = joblist::CPNULLSTRMARK;
// if (rid64 & 0x8000000000000000LL)
// ot[rid16].str = joblist::CPNULLSTRMARK;
}
}
}

View File

@ -193,19 +193,19 @@ void FilterCommand::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void FilterCommand::resetCommand(ByteStream& bs)
void FilterCommand::resetCommand(ByteStream& /*bs*/)
{
}
void FilterCommand::prep(int8_t outputType, bool absRids)
void FilterCommand::prep(int8_t /*outputType*/, bool /*absRids*/)
{
}
void FilterCommand::project(messageqcpp::SBS& bs)
void FilterCommand::project(messageqcpp::SBS& /*bs*/)
{
}
void FilterCommand::projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t col)
void FilterCommand::projectIntoRowGroup(rowgroup::RowGroup& /*rg*/, uint32_t /*col*/)
{
}

View File

@ -46,7 +46,7 @@ PassThruCommand::~PassThruCommand()
{
}
void PassThruCommand::prep(int8_t outputType, bool makeAbsRids)
void PassThruCommand::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
if (bpp->ot == ROW_GROUP)
{
@ -173,7 +173,7 @@ void PassThruCommand::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void PassThruCommand::resetCommand(ByteStream& bs)
void PassThruCommand::resetCommand(ByteStream& /*bs*/)
{
}

View File

@ -154,7 +154,7 @@ struct preFetchCond
boost::condition cond;
unsigned waiters;
preFetchCond(const uint64_t l)
preFetchCond(const uint64_t)
{
waiters = 0;
}
@ -825,7 +825,7 @@ void loadBlock(uint64_t lbid, QueryContext v, uint32_t t, int compType, void* bu
struct AsynchLoader
{
AsynchLoader(uint64_t l, QueryContext v, uint32_t t, int ct, uint32_t* cCount, uint32_t* rCount, bool trace,
uint32_t sesID, boost::mutex* m, uint32_t* loaderCount,
uint32_t /*sesID*/, boost::mutex* m, uint32_t* loaderCount,
boost::shared_ptr<BPPSendThread> st, // sendThread for abort upon exception.
VSSCache* vCache)
: lbid(l)
@ -833,7 +833,6 @@ struct AsynchLoader
, txn(t)
, compType(ct)
, LBIDTrace(trace)
, sessionID(sesID)
, cacheCount(cCount)
, readCount(rCount)
, busyLoaders(loaderCount)
@ -905,7 +904,6 @@ struct AsynchLoader
uint32_t txn;
int compType;
bool LBIDTrace;
uint32_t sessionID;
uint32_t* cacheCount;
uint32_t* readCount;
uint32_t* busyLoaders;
@ -1596,8 +1594,8 @@ struct BPPHandler
{
if (posix_time::second_clock::universal_time() > dieTime)
{
cout << "destroyBPP: job for id " << uniqueID << " and sessionID " << sessionID << " has been killed."
<< endl;
cout << "destroyBPP: job for id " << uniqueID << " and sessionID " << sessionID
<< " has been killed." << endl;
// If for some reason there are jobs for this uniqueID that arrived later
// they won't leave PP thread pool staying there forever.
}
@ -1617,7 +1615,7 @@ struct BPPHandler
if (bppv)
{
bppv->abort();
}
}
return 0;
}
@ -1841,7 +1839,7 @@ struct ReadThread
ios->write(buildCacheOpResp(0));
}
void doCacheFlushCmd(SP_UM_IOSOCK ios, const ByteStream& bs)
void doCacheFlushCmd(SP_UM_IOSOCK ios, const ByteStream& /*bs*/)
{
for (int i = 0; i < fCacheCount; i++)
{
@ -2251,19 +2249,17 @@ struct ServerThread
namespace primitiveprocessor
{
PrimitiveServer::PrimitiveServer(int serverThreads, int serverQueueSize, int processorWeight,
int processorQueueSize, bool rotatingDestination, uint32_t BRPBlocks,
int /*processorQueueSize*/, bool rotatingDestination, uint32_t BRPBlocks,
int BRPThreads, int cacheCount, int maxBlocksPerRead, int readAheadBlocks,
uint32_t deleteBlocks, bool ptTrace, double prefetch, uint64_t smallSide)
uint32_t deleteBlocks, bool ptTrace, double prefetch, uint64_t /*smallSide*/)
: fServerThreads(serverThreads)
, fServerQueueSize(serverQueueSize)
, fProcessorWeight(processorWeight)
, fProcessorQueueSize(processorQueueSize)
, fMaxBlocksPerRead(maxBlocksPerRead)
, fReadAheadBlocks(readAheadBlocks)
, fRotatingDestination(rotatingDestination)
, fPTTrace(ptTrace)
, fPrefetchThreshold(prefetch)
, fPMSmallSide(smallSide)
{
fCacheCount = cacheCount;
fServerpool.setMaxThreads(fServerThreads);

View File

@ -171,13 +171,11 @@ class PrimitiveServer
int fServerThreads;
int fServerQueueSize;
int fProcessorWeight;
int fProcessorQueueSize;
int fMaxBlocksPerRead;
int fReadAheadBlocks;
bool fRotatingDestination;
bool fPTTrace;
double fPrefetchThreshold;
uint64_t fPMSmallSide;
};
} // namespace primitiveprocessor

View File

@ -39,7 +39,7 @@
#include <thread>
#include <mutex>
#include <condition_variable>
//#define NDEBUG
// #define NDEBUG
#include <cassert>
using namespace std;
@ -123,10 +123,9 @@ void setupSignalHandlers()
sigaddset(&sigset, SIGPIPE);
sigaddset(&sigset, SIGUSR2);
sigprocmask(SIG_BLOCK, &sigset, 0);
}
int8_t setupCwd(Config* cf)
int8_t setupCwd(Config* /*cf*/)
{
string workdir = startup::StartUp::tmpDir();
@ -649,7 +648,6 @@ int ServicePrimProc::Child()
if ((strVal == "n") || (strVal == "N"))
directIOFlag = 0;
IDBPolicy::configIDBPolicy();
// no versionbuffer if using HDFS for performance reason

View File

@ -163,7 +163,7 @@ void RTSCommand::nextLBID()
col->nextLBID();
}
void RTSCommand::prep(int8_t outputType, bool makeAbsRids)
void RTSCommand::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
if (!passThru)
col->prep(OT_BOTH, true);

View File

@ -93,7 +93,7 @@ void added_a_pm(int)
std::cout << "Total UM memory available: " << num << std::endl;
}
void printTotalUmMemory(int sig)
void printTotalUmMemory(int /*sig*/)
{
int64_t num = globServiceExeMgr->getRm().availableMemory();
std::cout << "Total UM memory available: " << num << std::endl;

View File

@ -94,7 +94,7 @@ class Opt
}
};
void printTotalUmMemory(int sig);
void printTotalUmMemory(int sig);
class ServiceExeMgr : public Service, public Opt
{
@ -102,7 +102,7 @@ class ServiceExeMgr : public Service, public Opt
using ThreadCntPerSessionMap_t = std::map<uint32_t, uint32_t>;
protected:
void log(logging::LOG_TYPE type, const std::string& str)
void log(logging::LOG_TYPE type, const std::string& /*str*/)
{
logging::LoggingID logid(16);
logging::Message::Args args;
@ -113,40 +113,43 @@ class ServiceExeMgr : public Service, public Opt
logger.logMessage(type, message, logid);
}
public:
ServiceExeMgr(const Opt& opt, joblist::ResourceManager* rm) : Service("ExeMgr"), Opt(opt), msgLog_(logging::Logger(16)), rm_(rm)
{ }
void LogErrno() override
{
log(logging::LOG_TYPE_CRITICAL, std::string(strerror(errno)));
}
void ParentLogChildMessage(const std::string& str) override
{
log(logging::LOG_TYPE_INFO, str);
}
int Child() override;
int Run()
{
return m_fg ? Child() : RunForking();
}
static const constexpr unsigned logDefaultMsg = logging::M0000;
static const constexpr unsigned logDbProfStartStatement = logging::M0028;
static const constexpr unsigned logDbProfEndStatement = logging::M0029;
static const constexpr unsigned logStartSql = logging::M0041;
static const constexpr unsigned logEndSql = logging::M0042;
static const constexpr unsigned logRssTooBig = logging::M0044;
static const constexpr unsigned logDbProfQueryStats = logging::M0047;
static const constexpr unsigned logExeMgrExcpt = logging::M0055;
// If any flags other than the table mode flags are set, produce output to screeen
static const constexpr uint32_t flagsWantOutput = (0xffffffff & ~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_AUTOSWITCH &
~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_OFF);
logging::Logger& getLogger()
{
return msgLog_;
}
void updateSessionMap(const size_t pct)
{
std::lock_guard<std::mutex> lk(sessionMemMapMutex_);
public:
ServiceExeMgr(const Opt& opt, joblist::ResourceManager* rm)
: Service("ExeMgr"), Opt(opt), msgLog_(logging::Logger(16)), rm_(rm)
{
}
void LogErrno() override
{
log(logging::LOG_TYPE_CRITICAL, std::string(strerror(errno)));
}
void ParentLogChildMessage(const std::string& str) override
{
log(logging::LOG_TYPE_INFO, str);
}
int Child() override;
int Run()
{
return m_fg ? Child() : RunForking();
}
static const constexpr unsigned logDefaultMsg = logging::M0000;
static const constexpr unsigned logDbProfStartStatement = logging::M0028;
static const constexpr unsigned logDbProfEndStatement = logging::M0029;
static const constexpr unsigned logStartSql = logging::M0041;
static const constexpr unsigned logEndSql = logging::M0042;
static const constexpr unsigned logRssTooBig = logging::M0044;
static const constexpr unsigned logDbProfQueryStats = logging::M0047;
static const constexpr unsigned logExeMgrExcpt = logging::M0055;
// If any flags other than the table mode flags are set, produce output to screeen
static const constexpr uint32_t flagsWantOutput =
(0xffffffff & ~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_AUTOSWITCH &
~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_OFF);
logging::Logger& getLogger()
{
return msgLog_;
}
void updateSessionMap(const size_t pct)
{
std::lock_guard<std::mutex> lk(sessionMemMapMutex_);
for (auto mapIter = sessionMemMap_.begin(); mapIter != sessionMemMap_.end(); ++mapIter)
{