-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
1.2.3, master
What's Wrong?
result is wrong, which is in the reproducing steps.
What You Expected?
right result
How to Reproduce?
CREATE TABLE `crm_user_baby4` (
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`nick_name` varchar(100) NULL COMMENT '昵称',
`sex` tinyint(4) NULL COMMENT '性别',
`birthday` datev2 NULL COMMENT '生日',
`grade` tinyint(4) NULL COMMENT '年纪',
`age` float NULL COMMENT '年龄',
`interest` varchar(200) NULL COMMENT '兴趣',
`personality` smallint(6) NULL COMMENT '性格',
`update_time` datetimev2(0) NULL COMMENT '数据更新时间'
) ENGINE=OLAP
UNIQUE KEY(`user_id`)
COMMENT '用户宝贝信息'
DISTRIBUTED BY HASH(`user_id`) BUCKETS 16
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"colocate_with" = "__global__user_group",
"in_memory" = "true",
"storage_format" = "V2",
"enable_unique_key_merge_on_write" = "true",
"disable_auto_compaction" = "false"
);
INSERT INTO crm_user_baby4 (user_id,nick_name,sex,birthday,grade,age,interest,personality,update_time) VALUES
(2,'',1,'2020-01-01',1,1.0,'3,4,5',1,'2021-01-01 00:00:00'),
(1,'',1,'2020-01-01',1,1.0,'1,2,3,4,5',1,'2021-01-01 00:00:00'),
(3,'',1,'2020-01-01',1,1.0,'7,9',1,'2021-01-01 00:00:00');
-- wrong result
mysql> select interest, multi_match_any(interest,['1']) from crm_user_baby4;
+-----------+-----------------------------------------+
| interest | multi_match_any(`interest`, ARRAY('1')) |
+-----------+-----------------------------------------+
| 1,2,3,4,5 | -48 |
| 3,4,5 | -48 |
| 7,9 | -48 |
+-----------+-----------------------------------------+
-- right result
mysql> select multi_match_any('1,2,3,4,5',['1']) ;
+------------------------------------------+
| multi_match_any('1,2,3,4,5', ARRAY('1')) |
+------------------------------------------+
| 1 |
+------------------------------------------+
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct