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 support for appending to INET columns #111

Open
eerohele opened this issue Dec 12, 2024 · 0 comments
Open

Add support for appending to INET columns #111

eerohele opened this issue Dec 12, 2024 · 0 comments

Comments

@eerohele
Copy link

Given:

λ duckdb /tmp/foo.db
v1.1.3 19864453f7
Enter ".help" for usage hints.
D INSTALL inet;
D LOAD inet;
D CREATE TABLE foo (ip INET NOT NULL);

Then, with org.duckdb/duckdb_jdbc v1.1.2:

Connection db = DriverManager.getConnection("jdbc:duckdb:/tmp/foo.db");
DuckDBAppender appender = DuckDBAppender.createAppender(db, DuckDBConnection.DEFAULT_SCHEMA, "foo");

appender.beginRow();
appender.append("1.2.3.4");
appender.endRow();

appender.close();

I get this error:

Invalid Input Error: Failed to cast value: Type VARCHAR with value '1.2.3.4' can't be cast to the destination type STRUCT

Is it possible to add support for appending to an INET column?

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

No branches or pull requests

1 participant