From 3de4b0eff323ed07e4aace5c0cce5d989f32f611 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Mon, 13 Feb 2023 17:30:07 +0100 Subject: [PATCH] [jOOQ/jOOQ#14611] Make this work in Derby inline((Object) null) may require a cast in some RDBMS, e.g. Derby. We have to provide the field reference to the Param in order to be able to cast the NULL literal properly. --- jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java index b60be431f7..de551e2ba2 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java @@ -1497,7 +1497,7 @@ final class SelectQueryImpl extends AbstractResultQuery imp && !s.having.hasWhere() && !s.limit.isApplicable() && !s.hasUnions()) - s.union((Select) DSL.select(map(s.getSelect(), f -> inline((Object) null))).where(falseCondition())); + s.union((Select) DSL.select(map(s.getSelect(), f -> inline((Object) null, f))).where(falseCondition())); })); else accept0(ctx);