zabetak commented on code in PR #3474:
URL: https://github.com/apache/hive/pull/3474#discussion_r932172826


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -947,7 +947,7 @@ Pair<Boolean, String> canCBOHandleAst(ASTNode ast, QB qb, 
PreCboCtx cboCtx) {
     // Now check QB in more detail. canHandleQbForCbo returns null if query can
     // be handled.
     msg = CalcitePlanner.canHandleQbForCbo(queryProperties, conf, true, 
needToLogMessage);
-    if (msg == null) {
+    if (msg == null || msg.isEmpty()) {
       return Pair.of(true, msg);
     }
     msg = msg.substring(0, msg.length() - 2);

Review Comment:
   The current changes in the PR solve the IOBE, tests are green, and there is 
no change in behavior so I plan to merge this now.
   
   The rest of the changes proposed by @jfsii are an improvement worth having 
and are inline with what I briefly mentioned previously:
   
   > allowing `CalcitePlanner.canHandleQbForCbo(queryProperties, conf, true, 
needToLogMessage)` to return an empty `String` is not good
   
   I would like to get these additional changes merged as well so let's log a 
new JIRA and I will review ASAP. If nobody takes it in the next few days I can 
also work on it.



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