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

Merge branch 'develop-1.2' into MCOL-1983

Conflicts:
	VERSION
	utils/windowfunction/windowfunctiontype.cpp
This commit is contained in:
David Hall
2019-01-21 14:51:43 -06:00
19 changed files with 722 additions and 367 deletions

View File

@ -461,7 +461,8 @@ uint64_t IdbOrderBy::Hasher::operator()(const Row::Pointer& p) const
{
Row& row = ts->row1;
row.setPointer(p);
uint64_t ret = row.hash(colCount);
// MCOL-1829 Row::h uses colcount as an array idx down a callstack.
uint64_t ret = row.hash();//(colCount - 1);
//cout << "hash(): returning " << ret << " for row: " << row.toString() << endl;
return ret;
}
@ -471,7 +472,9 @@ bool IdbOrderBy::Eq::operator()(const Row::Pointer& d1, const Row::Pointer& d2)
Row& r1 = ts->row1, &r2 = ts->row2;
r1.setPointer(d1);
r2.setPointer(d2);
bool ret = r1.equals(r2, colCount);
// MCOL-1829 Row::equals uses 2nd argument as container size boundary
// so it must be column count - 1.
bool ret = r1.equals(r2, colCount - 1);
//cout << "equals(): returning " << (int) ret << " for r1: " << r1.toString() << " r2: " << r2.toString()
// << endl;

View File

@ -325,7 +325,7 @@ template<> void WindowFunctionType::setValue<string>(uint64_t i, string& t)
fRow.setStringField(t, i);
}
//template void WindowFunctionType::setValue<string>(int, int64_t, int64_t, int64_t, string*);
// MCOL-1676 Need a separate specialization for string now.
template<>
void WindowFunctionType::setValue<string>(int ct, int64_t b, int64_t e, int64_t c, string* v)
{
@ -343,7 +343,6 @@ void WindowFunctionType::setValue<string>(int ct, int64_t b, int64_t e, int64_t
break;
fRow.setData(getPointer((*fRowData)[j]));
// MCOL-1985 Set the data based on out column type (ct)
setValue(i, *v);
}
}
@ -365,7 +364,7 @@ void WindowFunctionType::setValue(int ct, int64_t b, int64_t e, int64_t c, T* v)
break;
fRow.setData(getPointer((*fRowData)[j]));
// MCOL-1985 Set the data based on out column type (ct)
// MCOL-1676 Set the data based on out column type (ct)
switch (ct)
{
case CalpontSystemCatalog::TINYINT:
@ -412,7 +411,7 @@ void WindowFunctionType::setValue(int ct, int64_t b, int64_t e, int64_t c, T* v)
setValue(i, *v);
}
}
}
}
}
template<typename T>
@ -545,8 +544,6 @@ template void WindowFunctionType::setValue<int64_t>(int, int64_t, int64_t, int64
template void WindowFunctionType::setValue<uint64_t>(int, int64_t, int64_t, int64_t, uint64_t*);
template void WindowFunctionType::setValue<float>(int, int64_t, int64_t, int64_t, float*);
template void WindowFunctionType::setValue<double>(int, int64_t, int64_t, int64_t, double*);
//template void WindowFunctionType::setValue<string>(int, int64_t, int64_t, int64_t, string*);
void* WindowFunctionType::getNullValueByType(int ct, int pos)
{