nastra commented on code in PR #9487:
URL: https://github.com/apache/iceberg/pull/9487#discussion_r1479428086


##########
core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java:
##########
@@ -245,13 +290,30 @@ public List<TableIdentifier> listTables(Namespace 
namespace) {
         row ->
             JdbcUtil.stringToTableIdentifier(
                 row.getString(JdbcUtil.TABLE_NAMESPACE), 
row.getString(JdbcUtil.TABLE_NAME)),
-        JdbcUtil.LIST_TABLES_SQL,
+        JdbcUtil.LIST_TABLE_SQL,
         catalogName,
-        JdbcUtil.namespaceToString(namespace));
+        JdbcUtil.namespaceToString(namespace),
+        JdbcUtil.TABLE_RECORD_TYPE);
   }
 
   @Override
   public void renameTable(TableIdentifier from, TableIdentifier to) {
+    if (!tableExists(from)) {

Review Comment:
   I would probably slightly change the ordering here to align with other 
catalog impls:
   * check if namespace exists
   * check if `from` exists
   
   I think we should also align `renameView(..)` to that as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to