1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-392 Apply astyle

Make this branch apply our style guidelines
This commit is contained in:
Andrew Hutchings
2018-05-01 09:52:26 +01:00
parent 4ef4286022
commit c40903de9b
31 changed files with 176 additions and 123 deletions

View File

@@ -606,6 +606,7 @@ void SimpleFilter::convertConstant()
result.intVal = dataconvert::DataConvert::timeToInt(result.strVal);
}
}
rcc->result(result);
}
}

View File

@@ -995,6 +995,7 @@ inline int64_t TreeNode::getDatetimeIntVal()
int day = 0;
memcpy(&tt, &fResult.intVal, 8);
// Note, this should probably be current date +/- time
if ((tt.hour > 23) && (!tt.is_neg))
{
@@ -1005,6 +1006,7 @@ inline int64_t TreeNode::getDatetimeIntVal()
{
tt.hour = 0;
}
dataconvert::DateTime dt(0, 0, day, tt.hour, tt.minute, tt.second, tt.msecond);
memcpy(&fResult.intVal, &dt, 8);
return fResult.intVal;

View File

@@ -648,10 +648,12 @@ int64_t GroupConcator::lengthEstimate(const rowgroup::Row& row)
fieldLen = 19; // YYYY-MM-DD HH24:MI:SS
// Decimal point and milliseconds
uint64_t colPrecision = row.getPrecision(*i);
if (colPrecision > 0 && colPrecision < 7)
{
fieldLen += colPrecision + 1;
}
break;
}
@@ -660,10 +662,12 @@ int64_t GroupConcator::lengthEstimate(const rowgroup::Row& row)
fieldLen = 10; // -HHH:MI:SS
// Decimal point and milliseconds
uint64_t colPrecision = row.getPrecision(*i);
if (colPrecision > 0 && colPrecision < 7)
{
fieldLen += colPrecision + 1;
}
break;
}

View File

@@ -842,6 +842,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
const uchar* pos = buf;
longlong tmp = my_datetime_packed_from_binary(pos, table->field[colpos]->decimals());
TIME_from_longlong_datetime_packed(&ltime, tmp);
if (!ltime.second_part)
{
fprintf(ci.filePtr, "%04d-%02d-%02d %02d:%02d:%02d%c",
@@ -855,6 +856,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
ltime.hour, ltime.minute, ltime.second,
ltime.second_part, ci.delimiter);
}
buf += table->field[colpos]->pack_length();
}
else
@@ -892,6 +894,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
const uchar* pos = buf;
longlong tmp = my_time_packed_from_binary(pos, table->field[colpos]->decimals());
TIME_from_longlong_time_packed(&ltime, tmp);
if (!ltime.second_part)
{
fprintf(ci.filePtr, "%02d:%02d:%02d%c",
@@ -903,6 +906,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
ltime.hour, ltime.minute, ltime.second,
ltime.second_part, ci.delimiter);
}
buf += table->field[colpos]->pack_length();
}