AcKing-Sam commented on issue #31676:
URL: https://github.com/apache/doris/issues/31676#issuecomment-2006799980
Hi, I have made a small test for your case. It seems that it works well.
```mysql
create table duptest (
a varchar(5) null,
b varchar(5) null,
c varchar(20) null,
d bigint(20) null,
)
ENGINE=OLAP
DUPLICATE KEY(a, b)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(a, b) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"is_being_synced" = "false",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false"
);
insert into duptest values('aa', 'aa', 'aaabb', 25);
insert into duptest values('bb', 'bb', 'caabb', 31);
insert into duptest values('aa', 'ab', 'bbabb', 26);
insert into duptest values('ab', 'aa', 'babb', 30);
SELECT a, b FROM duptest
WHERE c REGEXP '^b'
ORDER BY a ASC;
```
And the result:
```shell
mysql> select * from duptest;
+------+------+-------+------+
| a | b | c | d |
+------+------+-------+------+
| aa | aa | aaabb | 25 |
| bb | bb | caabb | 31 |
| aa | ab | bbabb | 26 |
| ab | aa | babb | 30 |
+------+------+-------+------+
4 rows in set (0.02 sec)
mysql> SELECT a, b FROM duptest
-> WHERE c REGEXP '^b'
-> ORDER BY a ASC;
+------+------+
| a | b |
+------+------+
| aa | ab |
| ab | aa |
+------+------+
2 rows in set (0.02 sec)
```
--
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]