sqltranslate函数不能正确的翻译 0 参数的函数;例如:TODAY(), NOW()
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.7k
- Forks
- 364
- PR merge metrics
- No merged PRs in 30d
Description
版本:
<dependency>
<groupId>com.scudata.esproc</groupId>
<artifactId>esproc</artifactId>
<version>20230228</version>
</dependency>
function.xml 中片段:
<FUNCTION name="TODAY" paramcount="0">
<INFO dbtype="ORACLE" value="SYSDATE"/>
<INFO dbtype="SQLSVR" value="GETDATE()"/>
<INFO dbtype="DB2" value="CURRENT DATE"/>
<INFO dbtype="MYSQL" value="CURDATE()"/>
<INFO dbtype="TERADATA" value="DATE"/>
<INFO dbtype="POSTGRES" value="CURRENT_DATE"/>
<INFO dbtype="ESPROC" value="now@d()"/>
</FUNCTION>
System.out.println(SQLUtil.translate("TODAY()", "ORACLE")); 输出是 TODAY() ;不符合 function.xml 中的配置
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 by locating SQLUtil.translate and the function.xml entry for the zero-parameter TODAY function. Reproduce SQLUtil.translate("TODAY()", "ORACLE") and compare its output with the configured SYSDATE translation; done means zero-argument functions use their function.xml mappings without retaining TODAY().
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
- 45/100