-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
57fc3f3
to
2fd10ff
Compare
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).
15b5513
to
5105358
Compare
@@ -457,12 +457,12 @@ public void renameColumn(ConnectorSession session, JdbcTableHandle handle, JdbcC | |||
quoted(newRemoteColumnName)); | |||
execute(connection, sql); | |||
} | |||
catch (TrinoException e) { | |||
catch (SQLSyntaxErrorException syntaxError) { |
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.
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.
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.
Thank you - this is very nice.
No description provided.