Open lukaseder opened 4 years ago
It seems to have been added in 9.7: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0055394.html
We started integration testing Db2 a long time ago, before 9.7, where this was not available yet. Just didn't notice the improvement.
Db2 does not correctly implement 3VL:
SELECT a, b, a OR b AS v
FROM
(VALUES(NULL),(TRUE),(FALSE)) t(a),
(VALUES(NULL),(TRUE),(FALSE)) u(b);
To yield:
A|B|V|
-|-|-|
| | |
1| |1|
0| | |
|1|1|
1|1|1|
0|1|1|
|0|0|
1|0|1|
0|0|0|
As can be seen, there's a bug in how the OR
predicate is evaluated. This can be seen here:
SELECT NULL OR FALSE, FALSE OR NULL FROM SYSIBM.dual;
Yielding:
1|2|
-|-|
0| |
Supporting the BOOLEAN
type means that we might produce very subtle regressions in this area. Not sure if we should...
These bugs completely break the [ NOT ] LIKE ANY
predicate, making it unusable. There might be other, more subtle regressions currently not covered by the integration tests. We cannot risk this.
It appears that Db2 has introduced support for standard SQL
BOOLEAN
types: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0055394.htmlWith all the goodies: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r_predicate_boolean.html
We'll support that as well from jOOQ 3.14 onwards. This change affects:
Field<Boolean>
usageDSL.not(Field<Boolean>)
(inNotField
)DSL.condition(Field<Boolean>)
(inFieldCondition
)DSL.field(Condition)
(inConditionAsField
)This is a backwards incompatible change with the following effects:
BOOLEAN
in DDL or cast expressions, jOOQ will no longer produceSMALLINT
column types