Dheeraj Panangat created FLINK-31985:
----------------------------------------
Summary: The currentDate() get transformed to TIMESTAMP_LTZ(3)
instead of DATE()
Key: FLINK-31985
URL: https://issues.apache.org/jira/browse/FLINK-31985
Project: Flink
Issue Type: Bug
Components: Table SQL / JDBC
Affects Versions: 1.16.1
Reporter: Dheeraj Panangat
As per the
[doc|https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/dev/table/functions/systemfunctions/],
the currentDate() function should match the SQL Function CURRENT_DATE
and currentTimestamp() function should match the SQL Function CURRENT_TIMESTAMP.
Currently seeing that the currentDate() transforms the column to TIMESTAMP
instead of DATE.
Alternate/Temporary Solution which works :
If instead of using {{}}
{code:java}
table.select(currentDate().as("xyz_date"){code}
if I write SqlQuery
{code:java}
select CURRENT_DATE as xyz_date{code}
it work fine and gets the value as a DATE and not timestamp
Can we please fix this for flink version 1.16 ?
Thanks
--
This message was sent by Atlassian Jira
(v8.20.10#820010)