1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-4839: Fix clang build (#2102)

* Fix clang build

* Extern C returned to plugin_instance

Co-authored-by: Leonid Fedorov <l.fedorov@mail.corp.ru>
This commit is contained in:
Leonid Fedorov
2021-08-23 23:58:56 +03:00
committed by GitHub
parent ea622eec93
commit ef09342d47
59 changed files with 422 additions and 600 deletions

View File

@ -1378,7 +1378,7 @@ DataConvert::StringToUDecimal(const datatypes::SystemCatalog::TypeAttributesStd&
const std::string& data, bool& pushWarning)
{
const cscDataType typeCode= datatypes::SystemCatalog::UDECIMAL;
// UDECIMAL numbers may not be negative
if (LIKELY(colType.colWidth == 16))
{
@ -1532,8 +1532,8 @@ DataConvert::StringToFloat(cscDataType typeCode,
if (floatvalue < 0.0 &&
typeCode == datatypes::SystemCatalog::UFLOAT &&
floatvalue != joblist::FLOATEMPTYROW &&
floatvalue != joblist::FLOATNULL)
floatvalue != static_cast<float>(joblist::FLOATEMPTYROW) &&
floatvalue != static_cast<float>(joblist::FLOATNULL))
{
value = 0.0; // QQ: should it assign floatvalue?
pushWarning = true;
@ -1595,8 +1595,8 @@ DataConvert::StringToDouble(cscDataType typeCode,
if (doublevalue < 0.0 &&
typeCode == datatypes::SystemCatalog::UDOUBLE &&
doublevalue != joblist::DOUBLEEMPTYROW &&
doublevalue != joblist::DOUBLENULL)
doublevalue != static_cast<double>(joblist::DOUBLEEMPTYROW) &&
doublevalue != static_cast<double>(joblist::DOUBLENULL))
{
doublevalue = 0.0; // QQ: should it assign "value" ?
pushWarning = true;

View File

@ -362,7 +362,7 @@ bool timeZoneToOffset(const char *str, std::string::size_type length, long *offs
return 1;
*offset = offset_tmp;
return 0;
}
@ -1111,11 +1111,11 @@ struct Time
signed is_neg : 1;
// NULL column value = 0xFFFFFFFFFFFFFFFE
Time() : msecond (0xFFFFFE),
second (0xFF),
minute (0xFF),
hour (0xFFF),
day (0x7FF),
Time() : msecond (-2),
second (-1),
minute (-1),
hour (-1),
day (-1),
is_neg (0b1)
{}
@ -1143,12 +1143,12 @@ struct Time
inline
void Time::reset()
{
msecond = 0xFFFFFE;
second = 0xFF;
minute = 0xFF;
hour = 0xFFF;
msecond = -2;
second = -1;
minute = -1;
hour = -1;
is_neg = 0b1;
day = 0x7FF;
day = -1;
}
inline
@ -1706,13 +1706,13 @@ inline int128_t strtoll128(const char* data, bool& saturate, char** ep)
if (*data == '\0')
{
if (ep)
if (ep)
*ep = (char*)data;
return res;
}
// skip leading whitespace characters
while (*data != '\0' &&
while (*data != '\0' &&
(*data == ' ' || *data == '\t' || *data == '\n'))
data++;