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

Mismatch between uuid bind to as variable vs value returned from db with jdbc #147

Open
1 task done
solita-kattelus opened this issue Feb 29, 2024 · 4 comments
Open
1 task done

Comments

@solita-kattelus
Copy link

What happens?

Testing new UUID binding and somehow get mismatching UUID back

    @Test
    public void testUUIDBinding() throws SQLException {
        UUID uuid = UUID.fromString("0b17ce61-375c-4ad8-97b3-349d96d35ab1");
        Connection conn = DriverManager.getConnection("jdbc:duckdb:");
        PreparedStatement statement = conn.prepareStatement("select ? as value");
        statement.setObject(1, uuid);
        ResultSet resultSet = statement.executeQuery();
        Assertions.assertTrue(resultSet.next());
        Object object = resultSet.getObject(1);
        Assertions.assertEquals(uuid, object);
        Assertions.assertFalse(resultSet.next());
    }

And it fails with Assertions.assertEquals(uuid, object); check as:

Expected :0b17ce61-375c-4ad8-97b3-349d96d35ab1
Actual   :8b17ce61-375c-4ad8-97b3-349d96d35ab1

To Reproduce

Reproduce can be done with junit test above.

OS:

macOs arm64

DuckDB Version:

0.10.0

DuckDB Client:

JDBC

Full Name:

Marko Kattelus

Affiliation:

Solita Oy

Have you tried this on the latest nightly build?

I have tested with a release build (and could not test with a nightly build)

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have
@rsmckinney
Copy link

Just ran into the same problem. Ouch. Is there a fix underway?

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

Copy link

This issue was closed because it has been stale for 30 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
@rsmckinney
Copy link

This is a bit too severe to ignore, no?

@hannes hannes transferred this issue from duckdb/duckdb Feb 24, 2025
@hannes hannes reopened this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants