You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/13 10:47:19 UTC

[GitHub] [incubator-doris] englefly commented on a diff in pull request #10099: [Refactor] change the macro style of the InListPredicate

englefly commented on code in PR #10099:
URL: https://github.com/apache/incubator-doris/pull/10099#discussion_r895580596


##########
be/src/olap/in_list_predicate.h:
##########
@@ -76,33 +76,55 @@ namespace doris {
 class VectorizedRowBatch;
 
 // todo(wb) support evaluate_and,evaluate_or
+template <class T>
+class InListPredicate : public ColumnPredicate {
+public:
+    InListPredicate(uint32_t column_id, phmap::flat_hash_set<T>&& values, bool in_or_not, bool is_opposite = false);
+    PredicateType type() const override { return PredicateType::IN_LIST; }
+    virtual void evaluate(VectorizedRowBatch* batch) const override;
+    void evaluate(ColumnBlock* block, uint16_t* sel, uint16_t* size) const override;
+    void evaluate_or(ColumnBlock* block, uint16_t* sel, uint16_t size,
+                        bool* flags) const override;
+    void evaluate_and(ColumnBlock* block, uint16_t* sel, uint16_t size,
+                        bool* flags) const override;
+    virtual Status evaluate(const Schema& schema,
+                            const std::vector<BitmapIndexIterator*>& iterators,
+                            uint32_t num_rows, roaring::Roaring* bitmap) const override;
+    void evaluate(vectorized::IColumn& column, uint16_t* sel, uint16_t* size) const override;
+    void evaluate_and(vectorized::IColumn& column, uint16_t* sel, uint16_t size,
+                        bool* flags) const override {}
+    void evaluate_or(vectorized::IColumn& column, uint16_t* sel, uint16_t size,
+                        bool* flags) const override {}
+
+private:
+    phmap::flat_hash_set<T> _values;
+    bool _in_or_not; //true for in(...), false for not in (...)
+};
+
+// template <class T>

Review Comment:
   It is better remove these codes when we clean non-vectorized code.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org