Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3412

FLOOR(timestamp TO WEEK) gives wrong result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • avatica-1.16.0, 1.23.0
    • avatica, core
    • None

    Description

      Floor timestamp to week exist error:

      The start day of the week is not Sunday or Monday, calcite use Thursday to split a week.

      Example:

      sql: select FLOOR(CAST('2017-01-28' AS TIMESTAMP) TO WEEK);

      Response:

      2017-01-26 00:00:00.0

       

      2017-01-26 is Thursday that is not our expect result. As result, 2017-01-22 is the first day that we expect.

       

       

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              kofiori huaicui
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified