Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31985

The currentDate() get transformed to TIMESTAMP_LTZ(3) instead of DATE()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.16.1
    • None
    • Table SQL / JDBC
    • None

    Description

      As per the doc, 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 {{}}

      table.select(currentDate().as("xyz_date")

      if I write SqlQuery 

      select CURRENT_DATE as xyz_date

      it work fine and gets the value as a DATE and not timestamp

      Can we please fix this for flink version 1.16 ?

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            dheerajpanangat Dheeraj Panangat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: