Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31654

sequence producing inconsistent intervals for month step

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

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 2.4.4
    • None
    • SQL
    • None

    Description

      Taking an example from https://spark.apache.org/docs/latest/api/sql/

      > SELECT sequence(to_date('2018-01-01'), to_date('2018-03-01'), interval 1 month);

      [2018-01-01,2018-02-01,2018-03-01]

      if one is to expand `stop` till the end of the year some intervals are returned as the last day of the month whereas first day of the month is expected

      > SELECT sequence(to_date('2018-01-01'), to_date('2019-01-01'), interval 1 month)

      [2018-01-01, 2018-02-01, 2018-03-01, *2018-03-31, 2018-04-30, 2018-05-31, 2018-06-30, 2018-07-31, 2018-08-31, 2018-09-30, 2018-10-31*, 2018-12-01, 2019-01-01]

       

      Attachments

        Activity

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

          People

            Unassigned Unassigned Assign to me
            roman_y Roman Yalki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment