Adding Array Support including Unit Tests#81
Adding Array Support including Unit Tests#81Swiddis merged 2 commits intoopensearch-project:mainfrom
Conversation
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
Few small comments. I'm going to test this manually to verify.
For documentation purposes can you add to PR description screenshots how it looks with and without this fix? Please add you sample data and mapping to let others verify the test.
Thanks
| @@ -61,15 +63,17 @@ public enum OpenSearchType { | |||
| STRING(JDBCType.VARCHAR, String.class, Integer.MAX_VALUE, 0, false), | |||
| IP(JDBCType.VARCHAR, String.class, 15, 0, false), | |||
| NESTED(JDBCType.STRUCT, null, 0, 0, false), | |||
There was a problem hiding this comment.
Maybe nested should be mapped to array
There was a problem hiding this comment.
Could you explain why? I may not be following.
There was a problem hiding this comment.
Nested is mapped to ARRAY in sql plugin, curious why it is different here?
OpenSearchDataType.java#L39
There was a problem hiding this comment.
A bug of workbench?
…lity Signed-off-by: Andrey Kuzin <akuzin@amazon.com>
|
The sample data I used to populate OpenSearch Index: |
| @@ -61,15 +63,17 @@ public enum OpenSearchType { | |||
| STRING(JDBCType.VARCHAR, String.class, Integer.MAX_VALUE, 0, false), | |||
| IP(JDBCType.VARCHAR, String.class, 15, 0, false), | |||
| NESTED(JDBCType.STRUCT, null, 0, 0, false), | |||
There was a problem hiding this comment.
A bug of workbench?
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com> Signed-off-by: akuzin1 <111004764+akuzin1@users.noreply.github.com>
|
I suspended this PR, because it is blocked by opensearch-project/sql#1300. We need to implement this feature in SQL plugin prior to make any changes in JDBC. |
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
|
Hi @akuzin1, I noticed this draft PR has been open for a while without recent activity. I'm doing some repository maintenance and wanted to check if you're still interested in completing this work? If you plan to continue working on this:
If you no longer plan to work on this:
If we don't hear back within 2 weeks, we'll close this PR to keep our PR list clean, but feel free to reopen it when you're ready to continue. Thank you for your contribution! |
|
Hi, @seankao-az, the PR was iniatially "suspended, because it is blocked by opensearch-project/sql#1300. A feature needed to be implemented in the SQL plugin prior to making any changes in JDBC." |
|
Don't see any clear issues and it works locally, lgtm |



Description
Even though there is no dedicated array field type in OpenSearch, one can still pass an array of values into any field. However, currently there is no way to take advantage of that feature. Therefore, I added Array support to the driver, so that the user can call
getArray(<column-index>)to retrieve the array object stored as a field from the returned ResultSet.Issues Resolved
[List any issues this PR will resolve]
Check List
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.