-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Try this:
try (Statement s = connection.createStatement()) {
s.executeUpdate("install spatial");
s.executeUpdate("load spatial");
try (ResultSet rs = s.executeQuery("select cast('point (1 1)' as geometry)")) {
rs.next();
println(HexFormat.of().formatHex(rs.getBytes(1)));
}
}This prints:
00000000000000000000000001000000000000000000f03f000000000000f03f
Which is an invalid WKB representation of point(1 1). The correct representation is:
0101000000000000000000f03f000000000000f03f
This can be validated with this query:
select st_ashexwkb(cast ('POINT(1 1)' as geometry));Or also with PostgreSQL:
select encode(st_asbinary(cast('point (1 1)' as geometry)), 'hex')`I'm not sure if this is a duckdb_jdbc problem or a duckdb problem. Feel free to move the issue if it's not a JDBC problem.
Metadata
Metadata
Assignees
Labels
No labels