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

Fix default precision and maxSize for all datetime types. #39

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

Yury-Fridlyand
Copy link
Collaborator

Signed-off-by: Yury-Fridlyand yury.fridlyand@improving.com

Description

The proposed fix changes default Precision and DisplaySize configured for TIME and DATE types.

https://github.com/Bit-Quill/opensearch-project-sql/blob/522901d0ce18ff36c54eb1acf10e3d2a0b9381e4/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java#L146-L147
Precision is the third arg and DisplaySize is the fourth arg.


https://github.com/Bit-Quill/opensearch-project-sql/blob/522901d0ce18ff36c54eb1acf10e3d2a0b9381e4/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java#L65-L66
Please, note, classes referenced here ^ are java.sql.* classes, not java.time.* ones. Time has no fraction seconds part.

See team review and discussion in Bit-Quill/opensearch-project-sql#185 and Bit-Quill/opensearch-project-sql#178

Test

Before
image

After
image

Issues Resolved

Fixes #21 and #19

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner December 19, 2022 21:34
@YANG-DB YANG-DB merged commit 6e963e0 into opensearch-project:main Jan 5, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 5, 2023
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
(cherry picked from commit 6e963e0)
YANG-DB pushed a commit that referenced this pull request Jan 5, 2023
)

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
(cherry picked from commit 6e963e0)

Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand deleted the integ-fix-#19-and-#21 branch January 7, 2023 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] JDBC Driver reports DATE max size incorrectly
3 participants