-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improve][Jdbc] Improve catalog connection cache #8626
Conversation
@@ -360,20 +356,6 @@ public List<String> listViews(String databaseName) | |||
} | |||
} | |||
|
|||
public List<String> listSynonym(String databaseName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to saphana catalog
|
||
@Slf4j | ||
public class RedshiftCatalog extends AbstractJdbcCatalog { | ||
|
||
private final String SELECT_COLUMNS = | ||
"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME ='%s' ORDER BY ordinal_position ASC"; | ||
|
||
protected final Map<String, Connection> connectionMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove duplicate code
@@ -204,55 +204,53 @@ protected String getDropDatabaseSql(String databaseName) { | |||
|
|||
@Override | |||
public CatalogTable getTable(String sqlQuery) throws SQLException { | |||
try (Connection connection = getConnection(defaultUrl)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache closed connection
Purpose of this pull request
[Jdbc] Improve catalog connection cache
Does this PR introduce any user-facing change?
No
How was this patch tested?
Check list
New License Guide
release-note
.