SPLWare / SPLWare/esProc

sqltranslate 无法正确翻译 LEFT(STR, N) 函数

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.