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 DatabaseMetaData.getImportedKeys in Trino JDBC #8708

Closed
walter-weinmann opened this issue Jul 29, 2021 · 3 comments
Closed
Labels
enhancement New feature or request jdbc Relates to Trino JDBC driver
Milestone

Comments

@walter-weinmann
Copy link

2021-07-29 14:10:36,559 [DatabaseSeeder.java] INFO  Start PostgreSQL via trino
java.sql.SQLFeatureNotSupportedException: imported keys not supported
        at io.trino.jdbc.TrinoDatabaseMetaData.getImportedKeys(TrinoDatabaseMetaData.java:1066)
        at ch.konnexions.db_seeder.jdbc.AbstractJdbcSeeder.dropTableConstraints(AbstractJdbcSeeder.java:965)
        at ch.konnexions.db_seeder.jdbc.AbstractJdbcSeeder.createData(AbstractJdbcSeeder.java:408)
        at ch.konnexions.db_seeder.DatabaseSeeder.main(DatabaseSeeder.java:250)
Processing of the script was aborted, error code=1
@findepi findepi added enhancement New feature or request jdbc Relates to Trino JDBC driver labels Jul 29, 2021
@findepi findepi changed the title TrinoDatabaseMetaData support incomplete Add support for DatabaseMetaData.getImportedKeys in Trino JDBC Jul 29, 2021
@findepi
Copy link
Member

findepi commented Jul 29, 2021

There are many unimplemented methods in Trino JDBC, you can them by searching for throw new SQLFeatureNotSupportedException in the code base
The DatabaseMetaData.getImportedKeys is one of them. @walter-weinmann Is this method of any particular interest?

The method docs is

Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table)

Currently there is no concept of primary or foreign keys in Trino, so it seems legitimate for this method to return an empty result set.

@walter-weinmann
Copy link
Author

Thanks @findepi for the explanation.

@findepi
Copy link
Member

findepi commented Mar 15, 2022

Fixed by #11472

@findepi findepi added this to the 374 milestone Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jdbc Relates to Trino JDBC driver
Development

No branches or pull requests

2 participants