pengtao211 opened a new issue, #19637:
URL: https://github.com/apache/doris/issues/19637

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   Apache Doris 1.2.4.1
   
   ### What's Wrong?
   
   当视图中新赋的空值或空字符串的字段,使用"like"模糊查询时,空值或空字符串都查出来了。
   select * from v_t_test where remark like '%测试%';
   
![image](https://github.com/apache/doris/assets/33829879/aeb47d95-73ab-497d-9c82-3d94aef2f92d)
   
   
   ### What You Expected?
   
   使用视图时,能正确使用like模糊查询
   
   ### How to Reproduce?
   
   1:
   CREATE TABLE t_test (
        `id` INT NOT NULL
       ,`name` STRING
   )
   UNIQUE KEY(`id`)
   DISTRIBUTED BY HASH(`id`) BUCKETS 10
   PROPERTIES (
   "enable_unique_key_merge_on_write" = "true",
   "replication_num" = "1"
   );
   
   2:
   insert into t_test 
values(1,'zhangsan'),(2,'lisi'),(3,'wangwu'),(4,''),(5,null);
   
   3:
   create view v_t_test as
   select id,name,'' as remark from t_test;
   
   4:
   select * from v_t_test where remark like '%测试%';
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to