duckdb / duckdb-java

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

Test failure: TestDuckDBJDBC#test_struct_with_bad_type fails because the check for the error message doesn't match. #69

Closed rpbouman closed 2 months ago

rpbouman commented 3 months ago

TestDuckDBJDBC#test_struct_with_bad_type fails with:

TestDuckDBJDBC#test_struct_with_bad_type failed with java.lang.Exception
java.lang.Exception
        at org.duckdb.test.Assertions.assertTrue(Assertions.java:15)
        at org.duckdb.test.Assertions.assertTrue(Assertions.java:10)
        at org.duckdb.TestDuckDBJDBC.test_struct_with_bad_type(TestDuckDBJDBC.java:3510)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.duckdb.test.Runner.runTests(Runner.java:45)
        at org.duckdb.TestDuckDBJDBC.main(TestDuckDBJDBC.java:4531)

The reason is that the assertion checks if the error message contains the string:

"Parser Error: syntax error at or near "TYPE""

But the actual error message returned by DuckDB is:

 "Invalid Input Error: Value "BAD TYPE NAME" can not be converted to a DuckDB Type.
Possible examples as suggestions:
* BYTEA
* DATE
* DATETIME
* BIT
* TINYINT