SPLWare / esProc

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.
http://doc.scudata.com/esproc/
Apache License 2.0
4.57k stars 329 forks source link

sqltranslate函数不能正确的翻译 0 参数的函数;例如:TODAY(), NOW() #39

Open Smartbicaopan opened 1 year ago

Smartbicaopan commented 1 year ago
    版本:
    <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 中的配置
RQWangXiaoJun commented 1 year ago

已修改,更新了SQLUtil类。