Open pengtao211 opened 1 year ago
Apache Doris 1.2.4.1 Apache Doris 1.2.3
当视图中新赋的空值或空字符串的字段,使用"like"模糊查询时,空值或空字符串都查出来了。 select * from v_t_test where remark like '%测试%';
使用视图时,能正确使用like模糊查询
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" );
id
name
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 '%测试%';
No response
This problem does exist after my verification. You can add me on wechat to keep you updated: cyllyy810222
有点不可思议~
Search before asking
Version
Apache Doris 1.2.4.1 Apache Doris 1.2.3
What's Wrong?
当视图中新赋的空值或空字符串的字段,使用"like"模糊查询时,空值或空字符串都查出来了。 select * from v_t_test where remark like '%测试%';
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?
Code of Conduct