[jOOQ/jOOQ#14965] Wrong emulation of DISTINCT ON with UNION

This commit is contained in:
Lukas Eder 2024-07-10 17:28:01 +02:00
parent 5a15867285
commit fc400a3ab8

View File

@ -3636,7 +3636,10 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|| WRAP_EXP_BODY_IN_DERIVED_TABLE_ORDER_BY.contains(ctx.dialect()) && !getOrderBy().isEmpty()
);
)
// [#15189] Window functions calculated in "alternative fields" must be calculated
// *after* qualify filtering has been done
|| hasAlternativeFields && qualify.hasWhere();
}