Closed
Conversation
when building on alpine (using its toolchain), without this file being explicitly listed, the resulting build fails with symbol errors in the resulting .so. adding this file explicitly to the build resolves them.
Collaborator
|
Hi, thanks for the PR! Sorry, I don't have permissions to approve the workflow run for this PR. Note, the same change in included with #170 PR (so either it or this one should be merged to fix the CI). Also, the same change is required in |
staticlibs
added a commit
to staticlibs/duckdb-java
that referenced
this pull request
Apr 2, 2025
`Connection#getTypeMap()` and `setTypeMap()` are two legacy methods that were added to Java in 1998 to support mapping composite DB fields to custom Java classes. With widespread use or object-relational mapping libraries (like Hibernate) these method remain virtually unused in Java applications. Still these method may be called by some tools, for example, when doing DB schema introspection. Looking how these methods work in other JDBC drivers, we can see that in Postgres' `pgjdbc` the type map is accepted, but not used for actual field mapping. And in SQL Server's `mssql-jdbc` only empty type map is accepted and empty type map is always returned. It is proposed to follow SQL Server's approach to not throw on `getTypeMap()` and to allow empty map input in `setTypeMap()`. Note: CMake change is unrelated, it is added to unbreak CI builds before duckdb#178 fix (or its variation from other PRs) is merged. Testing: new test added that checks that empty type map is allowed. Fixes: duckdb#150
Collaborator
|
Closing this in favor of #187. |
staticlibs
added a commit
to staticlibs/duckdb-java
that referenced
this pull request
Apr 7, 2025
`Connection#getTypeMap()` and `setTypeMap()` are two legacy methods that were added to Java in 1998 to support mapping composite DB fields to custom Java classes. With widespread use or object-relational mapping libraries (like Hibernate) these method remain virtually unused in Java applications. Still these method may be called by some tools, for example, when doing DB schema introspection. Looking how these methods work in other JDBC drivers, we can see that in Postgres' `pgjdbc` the type map is accepted, but not used for actual field mapping. And in SQL Server's `mssql-jdbc` only empty type map is accepted and empty type map is always returned. It is proposed to follow SQL Server's approach to not throw on `getTypeMap()` and to allow empty map input in `setTypeMap()`. Note: CMake change is unrelated, it is added to unbreak CI builds before duckdb#178 fix (or its variation from other PRs) is merged. Testing: new test added that checks that empty type map is allowed. Fixes: duckdb#150
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.
when building on alpine (using its toolchain), without this file being explicitly listed, the resulting build fails with symbol errors in the linked .so. adding this file explicitly to the build resolves them.