Skip to content
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

add types.cpp to jni build #178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add types.cpp to jni build #178

wants to merge 1 commit into from

Conversation

w1nk
Copy link

@w1nk w1nk commented Mar 27, 2025

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.

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.
@staticlibs
Copy link
Contributor

staticlibs commented Mar 27, 2025

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 CMakeLists.txt.in that is used to overwrite CMakeLists.txt when new engine sources are imported.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants