Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in function SOUNDEX not supported #3930

Open
jackysp opened this issue Jul 28, 2017 · 4 comments
Open

Built-in function SOUNDEX not supported #3930

jackysp opened this issue Jul 28, 2017 · 4 comments
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility

Comments

@jackysp
Copy link
Member

jackysp commented Jul 28, 2017

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
create table t1 (id integer, a varchar(100) character set utf8 collate utf8_unicode_ci); 
insert into t1 values (1, 'Test');    
select * from t1 where soundex(a) = soundex('Test');
  1. What did you expect to see?
+------+------+
| id   | a    |
+------+------+
|    1 | Test |
+------+------+
1 row in set (0.01 sec)
  1. What did you see instead?
ERROR 1105 (HY000): line 0 column 31 near "a) = soundex('Test')" (total length 51)
  1. What version of TiDB are you using (tidb-server -V)?
@ngaut ngaut removed the rc3.1 label Aug 16, 2017
@siddontang siddontang mentioned this issue Nov 24, 2018
54 tasks
@morgo morgo added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 24, 2018
@morgo
Copy link
Contributor

morgo commented Nov 24, 2018

This function is not an immediate priority, but it could be useful for claiming 100% compatibility with MySQL string functions. Open for contributors :-)

@ghost
Copy link

ghost commented Jul 29, 2020

Against master:

DROP TABLE IF EXISTS t1;
create table t1 (id integer, a varchar(100) character set utf8 collate utf8_unicode_ci); 
insert into t1 values (1, 'Test');    
select * from t1 where soundex(a) = soundex('Test');

..

mysql> select * from t1 where soundex(a) = soundex('Test');
ERROR 1305 (42000): FUNCTION test.soundex does not exist
mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-852-g1e7454c81
Edition: Community
Git Commit Hash: 1e7454c81d1f4fae464e835d1a4023a911cfa87b
Git Branch: master
UTC Build Time: 2020-07-28 01:36:23
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

@ghost ghost added the component/expression label Jul 29, 2020
@clark1013
Copy link
Contributor

/assign

@Alkaagr81
Copy link
Collaborator

Its not on priority but added for documentation. sounds like is an alias for soundex()

Select WEEKOFYEAR(LEAD(('5183-10-18 06:15:35.076079')SOUNDS LIKE(0x9E335D89),68)OVER());

In TIDB

mysql> Select WEEKOFYEAR(LEAD(('5183-10-18 06:15:35.076079')SOUNDS LIKE(0x9E335D89),68)OVER());
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 59 near "SOUNDS LIKE(0x9E335D89),68)OVER())" 

In Mysql

mysql> Select WEEKOFYEAR(LEAD(('5183-10-18 06:15:35.076079')SOUNDS LIKE(0x9E335D89),68)OVER());
+----------------------------------------------------------------------------------+
| WEEKOFYEAR(LEAD(('5183-10-18 06:15:35.076079')SOUNDS LIKE(0x9E335D89),68)OVER()) |
+----------------------------------------------------------------------------------+
|                                                                             NULL |
+----------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@clark1013 clark1013 removed their assignment Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility
Projects
None yet
Development

No branches or pull requests

5 participants