IBM-Cloud / sql-query-clients

Client samples for IBM Cloud SQL Query service
Apache License 2.0
12 stars 24 forks source link

Create table uses "contains" instead of exact match #130

Open sophierm opened 2 years ago

sophierm commented 2 years ago

Describe the bug When trying to create a new table, the method searches whether the table is already in the catalog. Here, if the table name is a subset of a table name that is already in the catalog the table creation fails.

To Reproduce Steps to reproduce the behavior:

  1. Create table "test123"
  2. Create table "test" -> no new table is created and the function returns none - nothing happens

Expected behavior Table creation should work for all table names that do not exactly match a table already in the catalog. We would expect more meaningful returns: return at least "true" or "false" values and even better, logging the reason why a table creation fails / throw exception.

Screenshots ibmcloudsql/catalog_table.py image (29) line 288