sqltranslate 无法正确翻译 LEFT(STR, N) 函数
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.7k
- Forks
- 364
- PR merge metrics
- No merged PRs in 30d
Description
String oracle_sql = SQLUtil.translate("LEFT(str,1)", "ORACLE");
System.out.println("oracle_sql:"+oracle_sql);
输出:oracle_sql:LEFT(str,1)
推测是因为LEFT既是关键字,又是函数名
但RIGHT函数是关键字,但运行RIGHT函数是正确的
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SQLUtil.translate entry point shown in the report and compare how LEFT(str,1) and RIGHT are handled for the ORACLE target. Reproduce the reported output, then verify that LEFT is translated correctly and add regression coverage if the repository provides a suitable test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100