Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-23523

Sql. Incorrect time formatting in sql logic tests causes test failures

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • sql

    Description

      The following test case fails despite its result is correct

      SELECT TIME '10:00:00' + INTERVAL '1' DAY
      
      java.lang.AssertionError: Not expected result at: (test_interval_addition.test_ignore:210). [row=0, col=0, expected=10:00:00, actual=10:00]
      

      Explanation:

      jshell> import java.time.LocalTime;
      
      jshell> String.valueOf(LocalTime.of(10, 0, 0)) 
      $4 ==> "10:00"
      

      We should update formatting for time and date time so it does not lose zeros in seconds.
       The other issue is present 'T' between the date and time. 

      Let's change formatting for date/time types in SqlLogicTest to simple human-readable format and fix appropriate tests

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jooger Iurii Gerzhedovich Assign to me
            mzhuravkov Maksim Zhuravkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment