Skip to content

Adding Struct Support #73

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

Merged
merged 4 commits into from
May 10, 2023
Merged

Conversation

akuzin1
Copy link
Contributor

@akuzin1 akuzin1 commented May 2, 2023

Description

Adds Struct support to driver.

Issues Resolved

#65

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.

Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!
You need to add unit tests, integration tests and fix DCO.

Comment on lines 71 to 74
private static final Set<Class> supportedJavaClasses = Collections.unmodifiableSet(
new HashSet<>(Arrays.asList(
Struct.class
)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ... = Set.of(Struct.class);? If it is available in this version of java.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah so for where we are using the JDBC driver we need java 8 support, so wouldn't be able to use the java 11 collections apis.

Signed-off-by: Andrey Kuzin <[email protected]>
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you build the driver and run an OpenSearch cluster with corresponding data and verify that everything works fine now?
Few screenshots from a DB management tool showing before and after your fix would a great proof.
I can provide you a sample data for tests if you need.

@akuzin1
Copy link
Contributor Author

akuzin1 commented May 5, 2023

Yeah I can definitely do that and any sample data would be great to have. Thank you.

@akuzin1
Copy link
Contributor Author

akuzin1 commented May 5, 2023

Here are a couple screenshots documenting the behavior before and after the above change when using the sql jdbc driver to query OpenSearch index with structs.
Before:
Screenshot 2023-05-05 at 2 04 57 PM
After:
Screenshot 2023-05-05 at 1 20 01 PM

Before:
Screenshot 2023-05-05 at 2 02 26 PM
After:
Screenshot 2023-05-05 at 1 35 16 PM

Signed-off-by: Andrey Kuzin <[email protected]>
Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change!

Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@dai-chen dai-chen merged commit c0ce14f into opensearch-project:main May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants