为什么 Clickhouse 中的“A left join B”和“B right join A”不同?

问题描述

我不在乎查询结果的顺序。从关系代数的角度来看,这些应该是一样的。这两个查询在 Clickhouse 中给出了不同的结果。

查询

select count(*) from A left join B on A.product_id = B.product_id and A.date = B.date

得到 20000 行;

select count(*) from B right join A on A.product_id = B.product_id and A.date = B.date

改为提供 300000 行。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)