sql icon indicating copy to clipboard operation
sql copied to clipboard

[BUG] Fix DateTimeFunctionTest. testWeekOfYearWithTimeType() YearweekTest. testYearweekWithTimeType() Unit tests.

Open vamsi-amazon opened this issue 1 year ago • 0 comments

What is the bug?

  • DateTimeFunctionTest. testWeekOfYearWithTimeType() YearweekTest. testYearweekWithTimeType() unit tests are temporarily fixed in this PR here : https://github.com/opensearch-project/sql/pull/2476.
  • The ask from this bug is to come up with a proper fix for it.

Issue details: Jan 2024 starts with Monday and we calculate weekoftheyear using SUNDAY as the firstdayoftheweek this makes 22nd Jan 3rd week of the year rather 4th week.

We can consider moving to LocalDateTime instead of Calendar.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What is the expected behavior? A clear and concise description of what you expected to happen.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots? If applicable, add screenshots to help explain your problem.

Do you have any additional context? Add any other context about the problem.

vamsi-amazon avatar Jan 25 '24 01:01 vamsi-amazon