apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.93k stars 3.14k forks source link

Table field values are not case sensitive #36532

Open smallcattle opened 4 weeks ago

smallcattle commented 4 weeks ago

Search before asking

Description

Table field values are not case sensitive, how to do it

For example, the organization code (org_code). Field values: A001 with records,a001 with records, A002 with records. When searching for org code by a, data will be missed I'm trying to search by the letter a, and the results are data that starts with an uppercase A and a lowercase a

Use case

For example, the organization code (org_code). Field values: A001 with records, a001 with records, A002 with records. When searching for org code by a, data will be missed I'm trying to search by the letter a, and the results are data that starts with an uppercase A and a lowercase a

Related issues

No response

Are you willing to submit PR?

Code of Conduct

zclllyybb commented 3 weeks ago

just use regex like these:

mysql> select 'abc' regexp 'ABC';
+----------------------+
| ('abc' regexp 'ABC') |
+----------------------+
|                    0 |
+----------------------+
1 row in set (0.10 sec)

mysql> select 'abc' regexp '(?i)ABC';
+--------------------------+
| ('abc' regexp '(?i)ABC') |
+--------------------------+
|                        1 |
+--------------------------+
1 row in set (0.10 sec)