thomasrebele commented on code in PR #6482:
URL: https://github.com/apache/hive/pull/6482#discussion_r3279842421


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -1036,16 +1041,61 @@ boolean isCBOExecuted() {
   }
 
   @Override
-  boolean isCBOSupportedLateralView(ASTNode lateralView) {
-    // LATERAL VIEW OUTER not supported in CBO
-    return lateralView.getToken().getType() != 
HiveParser.TOK_LATERAL_VIEW_OUTER;
+  boolean isCBOSupportedLateralView() {
+    // Both LATERAL VIEW and LATERAL VIEW OUTER are supported in CBO.
+    return !this.conf.getBoolVar(HiveConf.ConfVars.HIVE_CBO_RETPATH_HIVEOP);

Review Comment:
   Previously the result didn't depend on the `HIVE_CBO_RETPATH_HIVEOP` conf 
option. Maybe it should still return true if `lateralView.getToken().getType() 
== HiveParser.TOK_LATERAL_VIEW`?
   
   Could you please explain why using that conf option here? It's description 
is `Flag to control calcite plan to hive operator conversion`, but I don't 
understand its purpose.



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