You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by chen snowlake <je...@outlook.com> on 2019/02/14 10:07:01 UTC

[kylin] left join怎样join is null记录

HI:
大家好,在join的时候,我的联合的条件数据中存在is null记录,他们不能join起来
请问kylin是怎么写这样的查询? 不胜感激
比如
[cid:image003.png@01D4C490.0483D3B0]

… left Join … on ((a.region = a0.region) or (a.region is null and a0.region is null )) 这样的条件并不能将 nul行join起来

[cid:image006.png@01D4C490.0483D3B0]
SnowLake
Email:chenyj@outlook.com


Re: [kylin] left join怎样join is null记录

Posted by ShaoFeng Shi <sh...@apache.org>.
Can you use some value (like "unknown") to represent NULL ? NULL is not
equal to anything, including NULL:

https://stackoverflow.com/questions/1843451/why-does-null-null-evaluate-to-false-in-sql-server

Best regards,

Shaofeng Shi 史少锋
Apache Kylin PMC
Work email: shaofeng.shi@kyligence.io
Kyligence Inc: https://kyligence.io/

Apache Kylin FAQ: https://kylin.apache.org/docs/gettingstarted/faq.html
Join Kylin user mail group: user-subscribe@kylin.apache.org
Join Kylin dev mail group: dev-subscribe@kylin.apache.org




Na Zhai <na...@kyligence.io> 于2019年2月17日周日 下午8:58写道:

> Hi, chen
>
> I can not see your picture, you can try to add these in the attachment.
> Does it have any error message? Maybe you can try to change null to another
> word, like “unknown”.
>
> Best wishes!
>
> 发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
>
> ________________________________
> 发件人: chen snowlake <je...@outlook.com>
> 发送时间: Thursday, February 14, 2019 6:07:01 PM
> 收件人: dev@kylin.apache.org
> 主题: [kylin] left join怎样join is null记录
>
> HI:
> 大家好,在join的时候,我的联合的条件数据中存在is null记录,他们不能join起来
> 请问kylin是怎么写这样的查询? 不胜感激
> 比如
> [cid:image003.png@01D4C490.0483D3B0]
>
> … left Join … on ((a.region = a0.region) or (a.region is null and
> a0.region is null )) 这样的条件并不能将 nul行join起来
>
> [cid:image006.png@01D4C490.0483D3B0]
> SnowLake
> Email:chenyj@outlook.com
>
>

答复: [kylin] left join怎样join is null记录

Posted by Na Zhai <na...@kyligence.io>.
Hi, chen

I can not see your picture, you can try to add these in the attachment. Does it have any error message? Maybe you can try to change null to another word, like “unknown”.

Best wishes!

发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用

________________________________
发件人: chen snowlake <je...@outlook.com>
发送时间: Thursday, February 14, 2019 6:07:01 PM
收件人: dev@kylin.apache.org
主题: [kylin] left join怎样join is null记录

HI:
大家好,在join的时候,我的联合的条件数据中存在is null记录,他们不能join起来
请问kylin是怎么写这样的查询? 不胜感激
比如
[cid:image003.png@01D4C490.0483D3B0]

… left Join … on ((a.region = a0.region) or (a.region is null and a0.region is null )) 这样的条件并不能将 nul行join起来

[cid:image006.png@01D4C490.0483D3B0]
SnowLake
Email:chenyj@outlook.com