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

FLOOR(timestamp TO WEEK) gives wrong result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: avatica-1.16.0, 1.23.0
    • Component/s: avatica, core
    • Labels:
      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

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                kofiori huaicui
              • Votes:
                0 Vote for this issue
                Watchers:
                5 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