Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Inconsistent WEEK behavior in the documentdb driver compared to other data sources #509

Open
tjzhang-BQ opened this issue Feb 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tjzhang-BQ
Copy link

tjzhang-BQ commented Feb 27, 2023

Environment

  • DocumentDB JDBC driver version: 1.4.4
  • DocumentDB server version: MongoDB v6.0.3
  • OS: MacOS Ventura 13.1
  • BI Tool or client name: DBeaver
  • BI Tool or client version: 22.3.5

Problem Description

  1. Steps to reproduce: As is noted in the SQL limitation document, EXTRACT for WEEK or WEEK() return an integer between 0 and 53. This is in line with the MongoDB interpretation of week numbers but other databases more commonly return a value between 1 and 53. While this follows the MongoDB behavior, it would be ideal to also have the option to use isoWeek which Mongo also supports get access to the week number in ISO 8601 format.
    Same goes for FLOOR(timestamp TO timeunit), basically things that have to do with week numbering.
  2. Expected behaviour: Week number in ISO 8601 format also being available
  3. Actual behaviour: Currently only supports 0-53 in WEEK
  4. Error message/stack trace: N/A
  5. Any other details that can be helpful: This would be desirable since while this does follow the Mongo behavior, the inconsistency with other databases leads to some difficulties in the development of database connectors using this driver, which can be easily resolved with the ISO format being an option. Thanks.
@tjzhang-BQ tjzhang-BQ added the bug Something isn't working label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant