[
https://issues.apache.org/jira/browse/FLINK-23758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18107765#comment-18107765
]
Bettle commented on FLINK-23758:
--------------------------------
Hi ,[~dianfu] I encountered this issue while using PyFlink 1.20. The ~ operator
on a nullable Boolean expression produces an unexpected result: ~NULL evaluates
to TRUE, whereas SQL NOT NULL should remain NULL.
I checked the implementation and found that Expression._{_}invert{_}_ still
maps to isNotTrue in Flink 1.20.5, 2.0, 2.1, 2.2, 2.3, and the current master
branch.
I’d like to work on this issue. My plan is to:
- map Expression._{_}invert{_}_ to the not expression;
- update the existing expression serialization test;
- add a runtime regression test covering TRUE, FALSE, and NULL.
Could you please confirm whether this approach is appropriate and assign the
issue to me? Thanks!
> PyFlink __invert__ has wrong semantics
> --------------------------------------
>
> Key: FLINK-23758
> URL: https://issues.apache.org/jira/browse/FLINK-23758
> Project: Flink
> Issue Type: Bug
> Components: API / Python
> Affects Versions: 1.13.2
> Reporter: Ingo Bürk
> Priority: Minor
>
> PyFlink currently implements __invert__ using IS NOT TRUE. However, IS NOT
> TRUE and NOT behave differently for NULL values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)