imay commented on a change in pull request #3277: [Doris on es] Support 
compound_and predicate push down to Elasticsearch
URL: https://github.com/apache/incubator-doris/pull/3277#discussion_r405249722
 
 

 ##########
 File path: be/src/exec/es/es_query_builder.cpp
 ##########
 @@ -359,6 +370,17 @@ void BooleanQueryBuilder::validate(const 
std::vector<EsPredicate*>& espredicates
                     }
                     break;
                 }
+                case TExprNodeType::COMPOUND_PRED: {
+                    ExtCompAndPredicates* compound_predicates = 
(ExtCompAndPredicates *)predicate;
+                    std::vector<bool> list;
+                    validate(compound_predicates->conjuncts, &list);
+                    for(int i = list.size() - 1; i >= 0; i--) {
+                        if(!list[i]) {
+                            flag = false;
+                            break;
+                        }
+                    }
 
 Review comment:
   better to add a `break` clause here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to