duckdb / duckdb-java

DuckDB JDBC Driver
https://duckdb.org/docs/api/java.html
MIT License
42 stars 23 forks source link

UUID parameters need to be passed as strings #104

Open nikammerlaan opened 1 week ago

nikammerlaan commented 1 week ago

When dealing with UUID types, the intuitive method is to pass in a Java UUID object as the parameter. While this passes without error, it will never actually match. Instead, you need to pass in the UUID as a string. Other JDBC libs like postgres support this, so it seems natural for duckdb to support this as well.

Mause commented 1 week ago

Can you provide an example of the code you're running?

nikammerlaan commented 1 week ago

Here's a minimal reproducible example.

After comparing the inputs and outputs, it seems like there's something affecting just the beginning of the UUID:

Expected :a0a34a0a-1794-47b6-b45c-0ac68cc03702
Actual   :20a34a0a-1794-47b6-b45c-0ac68cc03702