wecharyu commented on code in PR #5003:
URL: https://github.com/apache/hive/pull/5003#discussion_r1467769084
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdatePart.java:
##########
@@ -344,14 +281,10 @@ private void updateWriteIdForPartitions(Connection
dbConn, long writeId, List<Lo
TxnUtils.buildQueryWithINClause(conf, queries, prefix, suffix,
partIdList, "\"PART_ID\"", false, false);
- Statement statement = null;
for (String query : queries) {
- try {
- statement = dbConn.createStatement();
- LOG.debug("Going to execute update " + query);
+ LOG.debug("Going to execute update " + query);
+ try (Statement statement = dbConn.createStatement()) {
Review Comment:
Addressed. Statement can be reused in this class.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]