dengzhhu653 commented on code in PR #5206:
URL: https://github.com/apache/hive/pull/5206#discussion_r1601191696
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDirectSqlUtils.java:
##########
@@ -609,4 +609,10 @@ public static void throwMetaOrRuntimeException(Exception
e) throws MetaException
throw new RuntimeException(e);
}
}
+
+ static int getCountOfQuery(Query query, Object[] params) {
Review Comment:
nit: how about move the QueryWrapper here as well, like:
```
long start = doTrace ? System.nanoTime() : 0;
try (QueryWrapper query = new QueryWrapper(query)) {
query.setUnique(true);
int sqlResult =
MetastoreDirectSqlUtils.extractSqlInt(query.executeWithArray(params));
long queryTime = doTrace ? System.nanoTime() : 0;
MetastoreDirectSqlUtils.timingTrace(doTrace, queryText, start,
queryTime);
return sqlResult;
}
```
--
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]