1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

fix(group by, having): MCOL-5776: GROUP BY/HAVING closer to server's (#3257)

This patch introduces an internal aggregate operator SELECT_SOME that
is automatically added to columns that are not in GROUP BY. It
"computes" some plausible value of the column (actually, last one
passed).

Along the way it fixes incorrect handling of HAVING being transferred
into WHERE, window function handling and a bit of other inconsistencies.
This commit is contained in:
Sergey Zefirov
2024-12-20 22:12:32 +03:00
committed by GitHub
parent 8f8620210b
commit 3bc8bd8cc6
20 changed files with 601 additions and 131 deletions

View File

@ -261,6 +261,10 @@ inline void ArithmeticOperator::evaluate(rowgroup::Row& row, bool& isNull, Parse
case execplan::CalpontSystemCatalog::SMALLINT:
case execplan::CalpontSystemCatalog::TINYINT:
fResult.intVal = execute(lop->getIntVal(row, isNull), rop->getIntVal(row, isNull), isNull);
if (isNull)
{
fResult.intVal = joblist::INTNULL;
}
break;
case execplan::CalpontSystemCatalog::UBIGINT:
@ -282,6 +286,10 @@ inline void ArithmeticOperator::evaluate(rowgroup::Row& row, bool& isNull, Parse
case execplan::CalpontSystemCatalog::USMALLINT:
case execplan::CalpontSystemCatalog::UTINYINT:
fResult.uintVal = execute(lop->getUintVal(row, isNull), rop->getUintVal(row, isNull), isNull);
if (isNull)
{
fResult.uintVal = joblist::UBIGINTNULL;
}
break;
case execplan::CalpontSystemCatalog::DOUBLE: