select支持rotate/not rotate函数

This commit is contained in:
liujinyu
2024-03-18 17:34:11 +08:00
committed by yaoxin
parent 8dac2e7acc
commit e72208e2df
34 changed files with 1791 additions and 26 deletions

View File

@ -661,6 +661,13 @@ static void advance_aggregates(AggState* aggstate, AggStatePerGroup pergroup)
int i;
int inputoff = peraggstate->inputoff;
if (peraggstate->aggrefstate->aggfilter) {
bool eisnull = false;
Datum exprValue =
ExecEvalExpr(peraggstate->aggrefstate->aggfilter, aggstate->evalproj->pi_exprContext, &eisnull, NULL);
if (eisnull || !DatumGetBool(exprValue))
continue;
}
if (peraggstate->numSortCols > 0) {
/* DISTINCT and/or ORDER BY case */
Assert(slot->tts_nvalid >= (peraggstate->numInputs + inputoff));