Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ public PreparedStatement getPreparedStatement(Connection connection, String sql)
public ResultSet getTables(Connection connection, Optional<String> remoteSchemaName, Optional<String> remoteTableName)
throws SQLException
{
// this method is called by IdentifierMapping, so cannot use IdentifierMapping here as this woudl cause an endless loop
// this method is called by IdentifierMapping, so cannot use IdentifierMapping here as this would cause an endless loop
DatabaseMetaData metadata = connection.getMetaData();
return metadata.getTables(
connection.getCatalog(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ public Optional<JdbcTableHandle> getTableHandle(ConnectorSession session, Schema
}
}

/*
/**
* Overridden since the {@link BaseJdbcClient#getTables(Connection, Optional, Optional)}
* method uses character escaping that doesn't work well with Druid's Avatica handler.
* Unfortunately, because we can't escape search characters like '_' and '%", this call
* ends up retrieving metadata for all tables that match the search
* pattern. For ex - LIKE some_table matches somertable, somextable and some_table.
*
* See getTableHandle(JdbcIdentity, SchemaTableName)} to look at
* See {@link DruidJdbcClient#getTableHandle(ConnectorSession, SchemaTableName)} to look at
* how tables are filtered.
*/
@Override
Expand Down Expand Up @@ -306,14 +306,15 @@ private JdbcTableHandle prepareTableHandleForQuery(JdbcTableHandle table)
return table;
}

/*
/**
* Overridden since the {@link BaseJdbcClient#getColumns(JdbcTableHandle, DatabaseMetaData)}
* method uses character escaping that doesn't work well with Druid's Avatica handler.
* Unfortunately, because we can't escape search characters like '_' and '%",
* this call ends up retrieving columns for all tables that match the search
* pattern. For ex - LIKE some_table matches somertable, somextable and some_table.
*
* See getColumns(ConnectorSession, JdbcTableHandle)} to look at tables are filtered.
* See {@link BaseJdbcClient#getColumns(ConnectorSession, JdbcTableHandle)} to look at
* how columns are filtered.
*/
@Override
protected ResultSet getColumns(JdbcTableHandle tableHandle, DatabaseMetaData metadata)
Expand Down