-
Notifications
You must be signed in to change notification settings - Fork 614
fix reading Array(Varian(String, Int32)) and similar when array has no common component class #2687
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
base: main
Are you sure you want to change the base?
Conversation
…for such cases, similar to nullable columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug in reading arrays of variant types (e.g., Array(Variant(String, Int32))) where elements can have different types. The fix treats variant arrays similarly to nullable arrays by using Object[] instead of trying to find a common component class.
Key Changes:
- Modified array reading logic to handle variant types by using
Object[]for storage - Added integration test coverage for arrays containing mixed-type variant elements
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| BinaryStreamReader.java | Updated condition to use Object[] for variant type arrays, preventing class cast exceptions |
| DataTypeTests.java | Added test case validating arrays with mixed String/Int32 variant elements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🤙
💡 To request another review, post a new comment with "/windsurf-review".
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
|
Client V1 CoverageCoverage Report
Class Coverage
|




Summary
fixed reading Array(Varian(String, Int32)) columns by using Object[] for such cases, similar to nullable columns
Closes #2602
Checklist
Delete items not relevant to your PR: