Gabriel39 commented on code in PR #10099: URL: https://github.com/apache/incubator-doris/pull/10099#discussion_r895570045
########## 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: delete these commented codes? -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org