Repository navigation
Report Object class for dynamic UNION and VARIANT metadata - #907
Merged
staticlibs merged 2 commits intoOct 10, 2026
Merged
staticlibs merged 2 commits into
staticlibs merged 2 commits into
Conversation
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
requested changes
Oct 9, 2026
Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
staticlibs
added a commit
that referenced
this pull request
Oct 10, 2026
This is a backport of the PR #907 to `v2.0-cyanoptera` branch. Co-Authored-By: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UNION and VARIANT columns currently report
java.lang.Stringfrom getColumnClassName even when getObject returns an Integer or another member type. Consumers that select casts from the metadata can receive a ClassCastException. Returnjava.lang.Objectfor these dynamic types so every non-null member is an instance of the reported class. The shared mapping also corrects parameter metadata; SQL type codes remain Types.OTHER.Regression tests cover mixed integer/string/null rows, metadata before row iteration, compatibility of returned values, unchanged VARCHAR/JSON neighbors, and UNION/VARIANT parameters. Both new column regressions fail against the original class.
Using JDK 17 and the official test runner, TestMetadata passed 34 tests, TestParameterMetadata 7, TestVariant 15, and the array method filter 40. Validation compiled the three changed Java classes and ran them ahead of an existing immutable JNI build on the classpath. No native rebuild or full project suite was run.
AI assistance: DeepSeek assisted implementation and initial review. The complete diff and actual baseline/modified test output were checked before submission.