Clickhouse:2个版本之间的行结果差异
在版本中19.13.3.26 以下查询返回1行:
select -1 as brandidTotal, toDecimal64(Sum(CostpriceSEK),2) as costprice
from mytable
where Stylenumber = 'a row which does not exist'
group by brandidTotal
但是在版本 22.2.2.1 中,它返回一个空的结果(我可以理解,因为在哪里找不到任何行)
似乎汇总函数总和改变了行为。 (如果删除了第二列,则两者都返回一个空集)
是否可以像19x一样使版本22X的处理方式?
In version 19.13.3.26 the following query returns 1 row:
select -1 as brandidTotal, toDecimal64(Sum(CostpriceSEK),2) as costprice
from mytable
where Stylenumber = 'a row which does not exist'
group by brandidTotal
But in version 22.2.2.1 it returns an empty result (which i can understand, since where does not find any rows)
It seems like the aggregate function SUM has changed behaviour. (if second column is removed, both returns an empty set)
Is it possible to make version 22X handle it like 19x does?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认为所有人启用它
to enable it by default for all