Xikui Wang has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2578

Change subject: [NO ISSUE][COMP] Fix infinite loop in 
CheckFilterExpressionTypeRule
......................................................................

[NO ISSUE][COMP] Fix infinite loop in CheckFilterExpressionTypeRule

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
When select condition is a UNION type, but not a BOOLEAN or ANY, this rule
may fall into infinite loop.

Change-Id: Ice4c9aa61658197a7140517d0a770886dfe040ec
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/78/2578/1

diff --git 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
index ab359bf..fe7e89d 100644
--- 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
+++ 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
@@ -80,6 +80,7 @@
             if (actualType.getTypeTag() == ATypeTag.BOOLEAN || 
actualType.getTypeTag() == ATypeTag.ANY) {
                 return true;
             }
+            type = actualType;
         }
         return false;
     }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2578
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice4c9aa61658197a7140517d0a770886dfe040ec
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Xikui Wang <xkk...@gmail.com>

Reply via email to