2.1.6,外部物化视图创建时和SQL识别大小写

Viewed 22

doris版本:2.1.6

第一个疑问

doris已经设置为不识别大小写,创建物化视图识别大小写

mysql> CREATE MATERIALIZED VIEW mv1
-> BUILD IMMEDIATE REFRESH AUTO ON SCHEDULE EVERY 1 DAY STARTS "2024-11-21 19:10:00"
-> DISTRIBUTED BY RANDOM BUCKETS 1
-> PROPERTIES ('replication_num' = '1')
-> AS
-> SELECT a.id,a.name,b.new_sex
-> FROM mysql_212.test.awh_test7 a
-> LEFT JOIN mysql_212.test.awh_TEST6 b ON a.ID =b.ID ;
ERROR 1105 (HY000): errCode = 2, detailMessage = Table [awh_TEST6] does not exist in database [test].
mysql>
mysql>
mysql> select * from mysql_212.test.awh_TEST6 limit 1;
+------+------+---------+------+--------+------------+
| id | name | new_sex | age | ageddd | rq |
+------+------+---------+------+--------+------------+
| 2 | a3 | | 0 | 0 | 2023-11-23 |
+------+------+---------+------+--------+------------+

第二个疑问

如下,加上limit 物化视图失效,FailSummary: Query struct info is invalid,这个正常吗?
explain
SELECT a.id,a.name,b.new_sex
FROM mysql_212.test.awh_test7 a
LEFT JOIN mysql_212.test.awh_test6 b ON a.ID =b.ID limit 10;

explain
SELECT a.id,a.name,b.new_sex
FROM mysql_212.test.awh_test7 a
LEFT JOIN mysql_212.test.awh_test6 b ON a.ID =b.ID;

第三个疑问

第一个sql命中物化视图,第二个随便将表名修改为大写,就不走物化视图了
explain
SELECT b.new_sex,count(1)
FROM mysql_212.test.awh_test7 a
LEFT JOIN mysql_212.test.awh_test6 b ON a.ID =b.ID
group by b.new_sex

explain
SELECT b.new_sex,count(1)
FROM mysql_212.test.awh_test7 a
LEFT JOIN mysql_212.test.awh_Test6 b ON a.ID =b.ID
group by b.new_sex

0 Answers