同步物化视图赋权

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】同步物化视图无法给用户赋权,但是物化视图是可以查询到数据的。
mysql> select * from test1.aaa [SYNC_MV];
±------------±-----------±-------------------±------------------±---------------------+
| lo_orderkey | lo_custkey | mv_sum_lo_quantity | mv_sum_lo_revenue | mv_count_lo_shipmode |
±------------±-----------±-------------------±------------------±---------------------+
| 0 | 0 | 0 | 0 | 1 |
±------------±-----------±-------------------±------------------±---------------------+
1 row in set (0.01 sec)

mysql> grant all on MATERIALIZED VIEW test1.aaa TO user ‘xxxx’@’%’;
ERROR 1064 (HY000): Getting analyzing error. Detail message: cannot find materialized view aaa in db test1.
赋权报错:ERROR 1064 (HY000): Getting analyzing error. Detail message: cannot find materialized view aaa in db test1.



【背景】创建物化视图,赋权给个人用户
【业务影响】无法单独赋权给用户
【是否存算分离】 不是存算分离
【StarRocks版本】3.2.10
【联系方式】liyanwei1@jd.com
【附件】
建表语句:
CREATE TABLE lineorder (
lo_orderkey int(11) NOT NULL COMMENT “”,
lo_linenumber int(11) NOT NULL COMMENT “”,
lo_custkey int(11) NOT NULL COMMENT “”,
lo_partkey int(11) NOT NULL COMMENT “”,
lo_suppkey int(11) NOT NULL COMMENT “”,
lo_orderdate int(11) NOT NULL COMMENT “”,
lo_orderpriority varchar(16) NOT NULL COMMENT “”,
lo_shippriority int(11) NOT NULL COMMENT “”,
lo_quantity int(11) NOT NULL COMMENT “”,
lo_extendedprice int(11) NOT NULL COMMENT “”,
lo_ordtotalprice int(11) NOT NULL COMMENT “”,
lo_discount int(11) NOT NULL COMMENT “”,
lo_revenue int(11) NOT NULL COMMENT “”,
lo_supplycost int(11) NOT NULL COMMENT “”,
lo_tax int(11) NOT NULL COMMENT “”,
lo_commitdate int(11) NOT NULL COMMENT “”,
lo_shipmode varchar(11) NOT NULL COMMENT “”
) ENGINE=OLAP
DUPLICATE KEY(lo_orderkey)
COMMENT “OLAP”
PARTITION BY RANGE(lo_orderdate)
(PARTITION p1 VALUES [("-2147483648"), (“19930101”)),
PARTITION p2 VALUES [(“19930101”), (“19940101”)),
PARTITION p3 VALUES [(“19940101”), (“19950101”)),
PARTITION p4 VALUES [(“19950101”), (“19960101”)),
PARTITION p5 VALUES [(“19960101”), (“19970101”)),
PARTITION p6 VALUES [(“19970101”), (“19980101”)),
PARTITION p7 VALUES [(“19980101”), (“19990101”)))
DISTRIBUTED BY HASH(lo_orderkey)
PROPERTIES (
“replication_num” = “3”,
“in_memory” = “false”,
“enable_persistent_index” = “false”,
“replicated_storage” = “true”,
“compression” = “LZ4”
);

建视图语句:
CREATE MATERIALIZED VIEW IF NOT EXISTS test1.aaa COMMENT ‘aaaa’ AS SELECT lineorder.lo_orderkey, lineorder.lo_custkey, sum(lineorder.lo_quantity) AS total_quantity, sum(lineorder.lo_revenue) AS total_revenue, count(lineorder.lo_shipmode) AS shipmode_countFROM test1.lineorderGROUP BY lineorder.lo_orderkey, lineorder.lo_custkey ORDER BY lineorder.lo_orderkey ASC

赋权语句:
grant all on MATERIALIZED VIEW aaa TO user ‘xxxx’@’%’;

同步物化视图不能 grant all on MATERIALIZED VIEW aaa TO user ‘xxxx’@’%’; 赋权,只能直接给基表授权,普通用户查询同步物化视图