You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
1. Fix for group_concat(distinct ... ) to use all unique values in a row.
2. Explicitly set array bounds for Row::hash() and Row::equals().
This commit is contained in:
@ -760,7 +760,7 @@ void GroupConcatOrderBy::initialize(const rowgroup::SP_GroupConcat& gcc)
|
||||
uint64_t GroupConcatOrderBy::getKeyLength() const
|
||||
{
|
||||
// only distinct the concatenated columns
|
||||
return fConcatColumns.size() - 1; // cols 0 to fConcatColumns will be conpared
|
||||
return fConcatColumns.size(); // cols 0 to fConcatColumns.size() - 1 will be compared
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ void LimitedOrderBy::initialize(const RowGroup& rg, const JobInfo& jobInfo)
|
||||
// not just a column count.
|
||||
uint64_t LimitedOrderBy::getKeyLength() const
|
||||
{
|
||||
return fOrderByCond.size();
|
||||
return fRow0.getColumnCount();
|
||||
}
|
||||
|
||||
|
||||
|
@ -506,8 +506,8 @@ uint64_t IdbOrderBy::Hasher::operator()(const Row::Pointer& p) const
|
||||
{
|
||||
Row& row = ts->row1;
|
||||
row.setPointer(p);
|
||||
// MCOL-1829 Row::h uses colcount as an array idx down a callstack.
|
||||
uint64_t ret = row.hash();
|
||||
// MCOL-1829 Row::hash uses colcount - 1 as an array idx down a callstack.
|
||||
uint64_t ret = row.hash(colCount - 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -517,7 +517,7 @@ bool IdbOrderBy::Eq::operator()(const Row::Pointer& d1, const Row::Pointer& d2)
|
||||
r1.setPointer(d1);
|
||||
r2.setPointer(d2);
|
||||
// MCOL-1829 Row::equals uses 2nd argument as key columns container size boundary
|
||||
bool ret = r1.equals(r2, colCount);
|
||||
bool ret = r1.equals(r2, colCount - 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user