deniskuzZ commented on code in PR #5003:
URL: https://github.com/apache/hive/pull/5003#discussion_r1466547209
##########
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:
why do we need new statements for each query? it looks like a batch update
--
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]