Skip to content
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

Clean extension points for managing objects BaseJdbcClient #14458

Merged
merged 10 commits into from
Oct 6, 2022

Conversation

findepi
Copy link
Member

@findepi findepi commented Oct 4, 2022

No description provided.

@findepi findepi added maintenance Project maintenance task no-release-notes This pull request does not require release notes entry labels Oct 4, 2022
@cla-bot cla-bot bot added the cla-signed label Oct 4, 2022
@findepi findepi force-pushed the findepi/jdbc-extensions branch from 57fc3f3 to 2fd10ff Compare October 4, 2022 14:42
findepi added 10 commits October 4, 2022 20:52
The condition could be reached for the enclosed ALTER ... RENAME COLUMN
statement, however the `execute(Connection, String)` method does not
propagate the `SQLException`, so it is actually unreachable.
The caller has a `Connection` so it has to deal with `SQLException`
anyway. This avoid premature wrapping of exceptions.
The extension point returning SQL query to execute is nice, but only
works when the execution itself is always the same (e.g. no prepared
statement parameters).
The extension point returning SQL query to execute is nice, but only
works when the execution itself is always the same (e.g. no prepared
statement parameters).
The extension point returning SQL query to execute is nice, but only
works when the execution itself is always the same (e.g. no prepared
statement parameters).
The extension point returning SQL query to execute is nice, but only
works when the execution itself is always the same (e.g. no prepared
statement parameters).
The extension point returning SQL query to execute is nice, but only
works when the execution itself is always the same (e.g. no prepared
statement parameters).
@findepi findepi force-pushed the findepi/jdbc-extensions branch from 15b5513 to 5105358 Compare October 4, 2022 19:30
@findepi findepi self-assigned this Oct 5, 2022
@@ -457,12 +457,12 @@ public void renameColumn(ConnectorSession session, JdbcTableHandle handle, JdbcC
quoted(newRemoteColumnName));
execute(connection, sql);
}
catch (TrinoException e) {
catch (SQLSyntaxErrorException syntaxError) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was confusion when I first read this - the change is equivalent because now the original exception gets thrown by execute instead of wrapped within TrinoException.

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you - this is very nice.

@findepi findepi merged commit 418bbc2 into trinodb:master Oct 6, 2022
@findepi findepi deleted the findepi/jdbc-extensions branch October 6, 2022 14:20
@github-actions github-actions bot added this to the 399 milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed maintenance Project maintenance task no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

4 participants