kangkaisen commented on a change in pull request #3694:
URL: https://github.com/apache/incubator-doris/pull/3694#discussion_r430887312



##########
File path: be/src/exec/olap_scan_node.cpp
##########
@@ -884,25 +910,54 @@ Status 
OlapScanNode::normalize_in_predicate(SlotDescriptor* slot, ColumnValueRan
                     case TYPE_INT:
                     case TYPE_BIGINT:
                     case TYPE_LARGEINT: {
+                        range->clear();
                         range->add_fixed_value(*reinterpret_cast<T*>(value));
                         break;
                     }
                     case TYPE_BOOLEAN: {
                         bool v = *reinterpret_cast<bool*>(value);
+                        range->clear();
                         range->add_fixed_value(*reinterpret_cast<T*>(&v));
                         break;
                     }
                     default: {
                         LOG(WARNING) << "Normalize filter fail, Unsupport 
Primitive type. [type="
-                                     << expr->type() << "]";
+                            << expr->type() << "]";
                         return Status::InternalError("Normalize filter fail, 
Unsupport Primitive type");
                     }
-                    }
                 }
+
+                meet_eq_binary = true;
+            } // end for each binary predicate child
+        } // end of handling eq binary predicate
+
+        if (range->get_fixed_value_size() > 0) {
+            // this columns already meet some eq predicates(IN or Binary),
+            // There is no need to continue to iterate.
+            // TODO(cmy): In fact, this part of the judgment should be 
completed in
+            // the FE query planning stage. For the following predicate 
conditions,
+            // it should be possible to eliminate at the FE side.
+            //      WHERE A = 1 and A in (2,3,4)

Review comment:
       OK




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



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

Reply via email to