kasakrisz commented on code in PR #4951:
URL: https://github.com/apache/hive/pull/4951#discussion_r1434213876


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelOptMaterializationValidator.java:
##########
@@ -308,24 +318,19 @@ public boolean isValidForQueryCaching() {
     return resultCacheInvalidReason == null;
   }
 
-  public String getAutomaticRewritingInvalidReason() {
-    return automaticRewritingInvalidReason;
-  }
-
-  public void setAutomaticRewritingInvalidReason(String 
automaticRewritingInvalidReason) {
-    if (isValidForAutomaticRewriting()) {
-      this.automaticRewritingInvalidReason = automaticRewritingInvalidReason;
-    }
+  public AutomaticRewritingValidationResult 
getAutomaticRewritingValidationResult() {
+    return automaticRewritingValidationResult;
   }
 
-  public void setAutomaticRewritingInvalidReason(RelNode node) {
+  public void unsupportedByCalciteRewrite(String sqlPartType, String sqlPart) {
     if (isValidForAutomaticRewriting()) {

Review Comment:
   There are two types of failures:
   1. disable both rewrite algs.
   2. allow text base only
   If type 1) is found we can stop traversing the tree.
   If type 2) is found we record it if this is the first one from this type but 
we have to continue traversing because there might be a type 1).
   
   Actually we print only one failure and if there are more than one from type 
2) it doesn't matter which one is printed. I kept the logic avoid too many 
golden file changes.



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