nastra commented on code in PR #9487: URL: https://github.com/apache/iceberg/pull/9487#discussion_r1484320774
########## core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java: ########## @@ -81,85 +109,243 @@ final class JdbcUtil { + TABLE_NAME + ")" + ")"; - static final String GET_TABLE_SQL = + static final String UPDATE_CATALOG_SQL = + "ALTER TABLE " + CATALOG_TABLE_VIEW_NAME + " ADD COLUMN " + TYPE + " VARCHAR(5)"; + + private static final String GET_VIEW_SQL = "SELECT * FROM " - + CATALOG_TABLE_NAME + + CATALOG_TABLE_VIEW_NAME + " WHERE " + CATALOG_NAME + " = ? AND " + TABLE_NAMESPACE + " = ? AND " + TABLE_NAME - + " = ? "; - static final String LIST_TABLES_SQL = + + " = ? AND " + + TYPE + + " = " + + "'" + + VIEW_RECORD_TYPE + + "'"; + private static final String GET_TABLE_SQL = "SELECT * FROM " - + CATALOG_TABLE_NAME + + CATALOG_TABLE_VIEW_NAME + " WHERE " + CATALOG_NAME + " = ? AND " + TABLE_NAMESPACE + + " = ? AND " + + TABLE_NAME + + " = ? AND (" + + TYPE + + " = " + + "'" + + TABLE_RECORD_TYPE + + "'" + + " OR " + + TYPE + + " IS NULL)"; // type is null when the SQL database has been updated from previous + // version Review Comment: nit: the hanging comment looks a bit odd -- 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