Copilot commented on code in PR #14495:
URL: https://github.com/apache/gravitino/pull/14495#discussion_r4438816723
##########
catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/operation/PostgreSqlTableOperations.java:
##########
@@ -756,14 +757,22 @@ protected Connection getConnection(String schema) throws
SQLException {
protected ResultSet getTable(Connection connection, String schema, String
tableName)
throws SQLException {
DatabaseMetaData metaData = connection.getMetaData();
- return metaData.getTables(connection.getCatalog(), schema, tableName,
null);
+ return metaData.getTables(
+ connection.getCatalog(),
+ metadataPattern(metaData, schema),
Review Comment:
`listTables()` still calls the inherited `JdbcTableOperations.getTables()`,
which passes `connection.getSchema()` unchanged as a LIKE pattern. Tables in a
schema named `back\slash_%` can now be loaded directly, but listing that schema
returns no tables because the backslash is consumed as an escape. Override the
listing lookup to escape its schema filter while retaining the null table-name
pattern and existing table-type filter, and add a regression assertion for
listing tables in that schema.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]