You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by "崔苗(联通集团西安软件研究院)" <cu...@chinaunicom.cn> on 2023/01/12 08:22:52 UTC
Re: [警惕!外部邮件]回复:物化视图去重统计
你好,基于bitmap_hash(k3) 生成 bitmap 后,去重统计值与实际值不一样,略小于实际值,是由于版本问题吗
________________________________
cuim28@chinaunicom.cn
发件人: BiteTheDDDDt<ma...@qq.com.INVALID>
发送时间: 2023-01-10 10:14
收件人: dev<ma...@doris.apache.org>
主题: [警惕!外部邮件]回复:物化视图去重统计
目前社区在进行物化视图增强的相关工作,预期最终可以起到如下效果:
```sql
create materialized view k1g3bm as select k1,bitmap_union(bitmap_hash(k3)) from d_table group by k1; //创建物化视图
select k1,bitmap_union_count(bitmap_hash(k3)) from d_table group by k1; //查询命中物化视图
```
可能会在之后的一个或者两个大版本中加入。
BiteTheDDDDt
pxl290@qq.com
------------------ 原始邮件 ------------------
发件人: "dev" <lishiyang@flywheels.com>;
发送时间: 2023年1月10日(星期二) 上午10:08
收件人: "dev"<dev@doris.apache.org>;"cuim28"<cuim28@chinaunicom.cn>;
主题: Re:物化视图去重统计
目前还不支持在非int类型上创建bitmap。可以在原始表上再新增一张表,该表有一个列是int类型,该列是user_id的mapping列,然后基于新表创建bitmap的物化视图;如果不是一定要创建物化视图,则bitmap_hash函数可以将varchar类型转为bitmap,但是该函数在物化视图上无法使用。
发件人:"崔苗(联通集团西安软件研究院)" <cuim28@chinaunicom.cn>
发送日期:2023-01-05 12:15:01
收件人:dev <dev@doris.apache.org>
主题:物化视图去重统计
针对官方文档中物化视图,最佳实践2,请问如果原始数据中 user_id 不是 int ,是 varchar 类型(uuid), 应该如何创建基于 bitmap的物化视图呢
谢谢大家
cuim28@chinaunicom.cn
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 hqs-spmc@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received this email in error please notify us immediately by e-mail. Please reply to hqs-spmc@chinaunicom.cn ,you can unsubscribe from this mail. We will immediately remove your information from send catalogue of our.
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 hqs-spmc@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received this email in error please notify us immediately by e-mail. Please reply to hqs-spmc@chinaunicom.cn ,you can unsubscribe from this mail. We will immediately remove your information from send catalogue of our.
回复: [警惕!外部邮件]回复:物化视图去重统计
Posted by BiteTheDDDDt <px...@qq.com.INVALID>.
如果可以的话,最好提供一个复现方式,以及使用doris的版本。可以记录在github的issue区。
BiteTheDDDDt
pxl290@qq.com
------------------ 原始邮件 ------------------
发件人: "dev" <cuim28@chinaunicom.cn>;
发送时间: 2023年1月12日(星期四) 下午4:22
收件人: "BiteTheDDDDt"<pxl290@qq.com.INVALID>;"dev"<dev@doris.apache.org>;
主题: Re: [警惕!外部邮件]回复:物化视图去重统计
你好,基于bitmap_hash(k3) 生成 bitmap 后,去重统计值与实际值不一样,略小于实际值,是由于版本问题吗
________________________________
cuim28@chinaunicom.cn
发件人: BiteTheDDDDt<mailto:pxl290@qq.com.INVALID>
发送时间: 2023-01-10 10:14
收件人: dev<mailto:dev@doris.apache.org>
主题: [警惕!外部邮件]回复:物化视图去重统计
目前社区在进行物化视图增强的相关工作,预期最终可以起到如下效果:
```sql
create materialized view k1g3bm as select k1,bitmap_union(bitmap_hash(k3)) from d_table group by k1; //创建物化视图
select k1,bitmap_union_count(bitmap_hash(k3)) from d_table group by k1; //查询命中物化视图
```
可能会在之后的一个或者两个大版本中加入。
BiteTheDDDDt
pxl290@qq.com
&nbsp;
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "dev" <lishiyang@flywheels.com&gt;;
发送时间:&nbsp;2023年1月10日(星期二) 上午10:08
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;"cuim28"<cuim28@chinaunicom.cn&gt;;
主题:&nbsp;Re:物化视图去重统计
目前还不支持在非int类型上创建bitmap。可以在原始表上再新增一张表,该表有一个列是int类型,该列是user_id的mapping列,然后基于新表创建bitmap的物化视图;如果不是一定要创建物化视图,则bitmap_hash函数可以将varchar类型转为bitmap,但是该函数在物化视图上无法使用。
发件人:"崔苗(联通集团西安软件研究院)" <cuim28@chinaunicom.cn&gt;
发送日期:2023-01-05 12:15:01
收件人:dev <dev@doris.apache.org&gt;
主题:物化视图去重统计
针对官方文档中物化视图,最佳实践2,请问如果原始数据中 user_id 不是 int ,是 varchar 类型(uuid), 应该如何创建基于 bitmap的物化视图呢
谢谢大家
cuim28@chinaunicom.cn
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 hqs-spmc@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received this email in error please notify us immediately by e-mail. Please reply to hqs-spmc@chinaunicom.cn ,you can unsubscribe from this mail. We will immediately remove your information from send catalogue of our.
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 hqs-spmc@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received this email in error please notify us immediately by e-mail. Please reply to hqs-spmc@chinaunicom.cn ,you can unsubscribe from this mail. We will immediately remove your information from send catalogue of our.