belugabehr commented on a change in pull request #1029:
URL: https://github.com/apache/hive/pull/1029#discussion_r435304118
##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
##########
@@ -198,9 +198,9 @@ private void closeStatementIfNeeded() throws SQLException {
} catch (SQLException e) {
throw e;
} catch (TApplicationException tae) {
- String errorMsg = tae.getMessage();
+ String errorMsg = "Failed to close statement";
if (tae.getType() == TApplicationException.BAD_SEQUENCE_ID) {
- errorMsg = "Mismatch thrift sequence id. A previous call to the Thrift
library failed"
+ errorMsg += ". Mismatch thrift sequence id. A previous call to the
Thrift library failed"
Review comment:
Lol. I'm so sorry to do this to you, I've been in your seat quite a few
times myself, but can you please do one more push? Please do not do the string
concatenation. This could be ripe for errors if the code changes later. Just
use a single static string which includes the words "Failed to close statement."
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]