Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-5042

floor function return wrong result for date type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • v4.0.0-beta, v3.1.2
    • None
    • None
    • None

    Description

      floor function return wrong result for date type, for example:

      select 
        floor(current_date to YEAR), 
        floor(cast('2021-07-01' AS DATE) to YEAR), 
        floor(cast('2021-07-01' AS TIMESTAMP) to YEAR)
      

      the result is:

      EXPR$0      EXPR$1      EXPR$2
      1970-01-01  1970-01-01  2021-01-01 00:00:00
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            xiacongling Congling Xia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: