Hi, 我又想了一下这个问题,我认为这个行为的确是有点不太合理,我建了一个issue[1] 来跟踪这个事情。
[1] https://issues.apache.org/jira/browse/FLINK-18164 whirly <[email protected]> 于2020年6月5日周五 下午11:20写道: > 好的,可能只是我的邮件客户端显示的问题,感谢回复。 > > 关于多加一个 is not null的判断的问题,po和我都觉得有些多此一举的感觉,而且有时候条件里字段很多,每个字段之前都需要加一个 is not > null,难度也很大,且容易出错。 > > 如果能有一个配置项控制 null <> 'someValue' 结果为true就好了 > > > > > whirly > 邮箱:[email protected] > > <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=whirly&uid=whirlys%40163.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fwzpmmc%2F3d273b243ffcc939aed9ae09c4b2529e.jpg&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Awhirlys%40163.com%22%5D> > > 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制 > > 在2020年06月05日 23:08,Benchao Li <[email protected]> 写道: > Hi, > > 我这边只收到一封你第一次发的邮件,看起来应该是没有问题。(不知道是不是你邮箱客户端本地显示的问题) > 关于你的问题,现在的确是这样子处理的。我想问一下,多加一个IS NOT NULL有什么问题么? > > whirly <[email protected]> 于2020年6月5日周五 下午9:54写道: > > > 不好意思,刚刚发现163邮箱自动重发了好几次这个提问,不知道怎么回事,可能是邮箱bug? 实在打扰了,而且现在不知道是不是还会自动重发 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 在 2020-06-05 14:25:10,"whirly" <[email protected]> 写道: > > >大家好: > > > 在 flink sql 中,如 SELECT * from order where product <> > 'rubber',如果数据中的 > > product 字段值是 null, 是无法匹配 product <> 'rubber' 这个条件的,虽然 null 确实不等于 > 'rubber' > > > 只有将条件改为 where product is Null or product <> 'rubber' 才能匹配。 > > > 但是我想要 null <> 'rubber' 的结果也为 True,且不想在条件之前加上 product is Null > > 的判断,可以怎么办呢? > > > > > > > > >感谢 > > > > > -- > > Best, > Benchao Li > > -- Best, Benchao Li
