版本:3.1
bitmap_union(to_bitmap(正则)) 里面嵌套了正则表达式,异步物化视图查询改写无效
语句如下:
CREATE MATERIALIZED VIEW test_master_mv12
COMMENT “MATERIALIZED_VIEW”
PARTITION BY report_date
DISTRIBUTED BY HASH(shop_id
) BUCKETS 6
REFRESH ASYNC START(“2023-10-01 10:00:00”) EVERY(INTERVAL 1 DAY)
PROPERTIES(
“partition_ttl_number”=“365”,
“mv_rewrite_staleness_second”=“1800”,
“auto_refresh_partitions_limit”=“366”,
“resource_group” = “viewGroup”
)
as
select
report_date,
shop_id,
charge_back_flag,
bitmap_union(to_bitmap(CASE WHEN user_mobile REGEXP ‘^[1][3-9][0-9]{9}$’ THEN user_mobile END)) as union_mobile
from order_maste
group by report_date , shop_id, charge_back_flag
SQL语句能执行吗?
select
report_date,
shop_id,
charge_back_flag,
bitmap_union(to_bitmap(CASE WHEN user_mobile REGEXP ‘^[1][3-9][0-9]{9}$’ THEN user_mobile END)) as union_mobile
from order_maste
group by report_date , shop_id, charge_back_flag
能执行