如何对多个位图执行 AND 运算

发布于 2025-01-18 09:50:36 字数 68 浏览 3 评论 0原文

我有多个位图,是否有像 bitmapAnd(b1,b2,b3,b4....bn) 这样的函数允许我获得 AND 运算结果?

I have multiple bitmaps, is there some functions like bitmapAnd(b1,b2,b3,b4....bn) allow me to get AND operation result?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一念一轮回 2025-01-25 09:50:36

bitmapand不超过两个参数,您必须链接呼叫:

bitmapAnd(b1, bitmapAnd(b2, bitmapAnd(b3, b4))))

如果您有太多的参数,并且WNAT以更简洁的方式编写它,我建议写入使用数组并通过功能减少它:

select arrayReduce('bitmapAnd', groupArray(bitmap)) from bitmaps group by something

在这里,我按子句从组中构建数组,但是您当然可以做到这一点。

bitmapAnd doesn't take more than two parameters, you have to chain the calls:

bitmapAnd(b1, bitmapAnd(b2, bitmapAnd(b3, b4))))

If you have too many of them, and wnat to write it in a more concise way, I would suggest to write use an array and reduce it with the function:

select arrayReduce('bitmapAnd', groupArray(bitmap)) from bitmaps group by something

Here I build the array from the group by clause, but you can do it how ever you want of course.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文