deniskuzZ commented on code in PR #6943:
URL: https://github.com/apache/hive/pull/6943#discussion_r4467533700


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metastore/GetHelper.java:
##########
@@ -119,7 +121,12 @@ public T run(boolean initTable) throws MetaException, 
NoSuchObjectException {
       // Note that this will be invoked in 2 cases:
       //    1) DirectSQL was disabled to start with;
       //    2) DirectSQL threw and was disabled in handleDirectSqlError.
-      if (!doUseDirectSql && canUseJdoQuery()) {
+      if (!doUseDirectSql) {
+        if (!canUseJdoQuery()) {

Review Comment:
   With DirectSqlOnlyHelper making canUseDirectSql() final/true, it’s only 
reachable by a helper that bypasses DirectSqlOnlyHelper. If we keep it, please 
avoid describeResult() in the message: results is still null there, and 
overrides like getPartitionColsWithStats (results.size() + " partitions") would 
NPE and hide the real error. A static message like the constructor’s would do.
   
   btw, we already define local var `allowJdo = canUseJdoQuery();`



-- 
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]

Reply via email to