Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9501

[C++][Gandiva] Add logic in timestampdiff() when end date is last day of a month

    XMLWordPrintableJSON

    Details

      Description

      timestampdiff(month, startDate, endDate) returns wrong result in Gandiva when the endDate < startDate and endDate is the last day of the month. An additional month is said to have passed when the end day is greater than or equal to the start day, but this does not hold true for dates which are last days of the month.

      Case in point, if startDate = 2020-01-31, endDate = 2020-02-29, previously timestampdiff() returned 0, but the correct result should be 1.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sagnikc Sagnik Chakraborty
                Reporter:
                sagnikc Sagnik Chakraborty
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m