Zhengqiang Duan created CALCITE-6666: ----------------------------------------
Summary: Support Oracle SYSDATE and SYSTIMESTAMP functions Key: CALCITE-6666 URL: https://issues.apache.org/jira/browse/CALCITE-6666 Project: Calcite Issue Type: Improvement Reporter: Zhengqiang Duan Assignee: Zhengqiang Duan Hi community. When I execute sql with Oracle SYSDATE and SYSTIMESTAMP functions, the following error message appears. {code:java} SELECT SYSDATE FROM SBTEST1 WHERE ID = 12345600 // Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to line 1, column 14: Column 'SYSDATE' not found in any table SELECT SYSTIMESTAMP FROM SBTEST1 WHERE ID = 12345600 // Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to line 1, column 19: Column 'SYSTIMESTAMP' not found in any table {code} I checked the Oracle official documentation and found that SYSDATE and SYSTIMESAMP functions are similar to CURRENT_DATE and CURRENT_TIMESTAMP. I think we can quickly adapt to support them. Here is the documentation for the Oracle SYSDATE and SYSTIMESTAMP functions: - https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/SYSDATE.html - https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/SYSTIMESTAMP.html Refer to this article - https://database-heartbeat.com/2021/09/28/sysdate-vs-current_date-in-oracle-database/, he describes the difference between SYSDATE, SYSTIMESTAMP functions, and CURRENT_DATE, CURRENT_TIMESTAMP: SYSDATE is a SQL function that returns the current date and time set for the operating system of the database server. CURRENT_DATE returns the current date in the session time zone. The same story applies to SYSTIMESTAMP and CURRENT_TIMESTAMP. -- This message was sent by Atlassian Jira (v8.20.10#820010)