You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-25 20:23:16 +03:00
Merge pull request #1015 from pleblanc1976/mcol-3716
Mcol-3716: Wrong min/max after cpimport which causes wrong select results
This commit is contained in:
committed by
Patrick LeBlanc
parent
4b4198608d
commit
9e24412681
@@ -719,7 +719,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
origVal = strtoll(field, 0, 10);
|
origVal = strtoll(field, 0, 10);
|
||||||
|
|
||||||
if (errno == ERANGE)
|
if (errno == ERANGE)
|
||||||
bSatVal = true;
|
bSatVal = true;
|
||||||
}
|
}
|
||||||
@@ -804,7 +804,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
|
|||||||
strcpy(field, "1");
|
strcpy(field, "1");
|
||||||
fieldLength = 1;
|
fieldLength = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (column.dataType == CalpontSystemCatalog::DECIMAL ) ||
|
if ( (column.dataType == CalpontSystemCatalog::DECIMAL ) ||
|
||||||
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
||||||
{
|
{
|
||||||
@@ -979,7 +979,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
|
|||||||
strcpy(field, "1");
|
strcpy(field, "1");
|
||||||
fieldLength = 1;
|
fieldLength = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (column.dataType == CalpontSystemCatalog::DECIMAL) ||
|
if ( (column.dataType == CalpontSystemCatalog::DECIMAL) ||
|
||||||
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
||||||
{
|
{
|
||||||
@@ -1411,7 +1411,7 @@ void BulkLoadBuffer::convert(char* field, int fieldLength,
|
|||||||
strcpy(field, "1");
|
strcpy(field, "1");
|
||||||
fieldLength = 1;
|
fieldLength = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (column.dataType == CalpontSystemCatalog::DECIMAL) ||
|
if ( (column.dataType == CalpontSystemCatalog::DECIMAL) ||
|
||||||
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
(column.dataType == CalpontSystemCatalog::UDECIMAL))
|
||||||
{
|
{
|
||||||
@@ -1642,7 +1642,7 @@ int BulkLoadBuffer::parseCol(ColumnInfo& columnInfo)
|
|||||||
tokenNullFlag = true;
|
tokenNullFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert the data into appropriate format.
|
// convert the data into appropriate format and update CP values
|
||||||
convert(field, tokenLength, tokenNullFlag,
|
convert(field, tokenLength, tokenNullFlag,
|
||||||
buf + i * columnInfo.column.width,
|
buf + i * columnInfo.column.width,
|
||||||
columnInfo.column, bufStats);
|
columnInfo.column, bufStats);
|
||||||
@@ -1673,7 +1673,7 @@ int BulkLoadBuffer::parseCol(ColumnInfo& columnInfo)
|
|||||||
|
|
||||||
lastInputRowInExtent += columnInfo.rowsPerExtent();
|
lastInputRowInExtent += columnInfo.rowsPerExtent();
|
||||||
|
|
||||||
if (isUnsigned(columnInfo.column.dataType))
|
if (isUnsigned(columnInfo.column.dataType) || isCharType(columnInfo.column.dataType))
|
||||||
{
|
{
|
||||||
bufStats.minBufferVal = static_cast<int64_t>(MAX_UBIGINT);
|
bufStats.minBufferVal = static_cast<int64_t>(MAX_UBIGINT);
|
||||||
bufStats.maxBufferVal = static_cast<int64_t>(MIN_UBIGINT);
|
bufStats.maxBufferVal = static_cast<int64_t>(MIN_UBIGINT);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
int64_t satCount;
|
int64_t satCount;
|
||||||
BLBufferStats(ColDataType colDataType) : satCount(0)
|
BLBufferStats(ColDataType colDataType) : satCount(0)
|
||||||
{
|
{
|
||||||
if (isUnsigned(colDataType))
|
if (isUnsigned(colDataType) || isCharType(colDataType))
|
||||||
{
|
{
|
||||||
minBufferVal = static_cast<int64_t>(MAX_UBIGINT);
|
minBufferVal = static_cast<int64_t>(MAX_UBIGINT);
|
||||||
maxBufferVal = static_cast<int64_t>(MIN_UBIGINT);
|
maxBufferVal = static_cast<int64_t>(MIN_UBIGINT);
|
||||||
|
|||||||
Reference in New Issue
Block a user