eldenmoon commented on code in PR #53738:
URL: https://github.com/apache/doris/pull/53738#discussion_r2224291864
##########
be/src/olap/rowset/segment_v2/inverted_index_iterator.h:
##########
@@ -34,25 +35,55 @@ struct InvertedIndexParam {
class InvertedIndexIterator : public IndexIterator {
public:
InvertedIndexIterator(const io::IOContext& io_ctx, OlapReaderStatistics*
stats,
- RuntimeState* runtime_state, const IndexReaderPtr&
reader);
- ~InvertedIndexIterator() override = default;
+ RuntimeState* runtime_state);
+
+ void add_reader(InvertedIndexReaderType type, const
InvertedIndexReaderPtr& reader);
IndexType type() override { return IndexType::INVERTED; }
- IndexReaderPtr get_reader() override { return _index_reader; }
- Status read_from_index(const IndexParam& param) override;
- Status read_null_bitmap(InvertedIndexQueryCacheHandle* cache_handle)
override;
- bool has_null() override;
+ Status read_from_index(const IndexParam& param) override;
-private:
- Status try_read_from_inverted_index(const std::string& column_name, const
void* query_value,
- InvertedIndexQueryType query_type,
uint32_t* count);
+ Status read_null_bitmap(InvertedIndexQueryCacheHandle* cache_handle)
override;
+
+ [[nodiscard]] Result<bool> has_null() override;
- InvertedIndexReaderPtr _index_reader;
+ IndexReaderPtr get_reader(InvertedIndexReaderType type) override;
+private:
ENABLE_FACTORY_CREATOR(InvertedIndexIterator);
- friend class InvertedIndexReaderTest;
+ Status try_read_from_inverted_index(const InvertedIndexReaderPtr& reader,
+ const std::string& column_name, const
void* query_value,
+ InvertedIndexQueryType query_type,
uint32_t* count);
+ Result<InvertedIndexReaderPtr> _select_best_reader(const
vectorized::DataTypePtr& column_type,
+ InvertedIndexQueryType
query_type);
+ Result<InvertedIndexReaderPtr> _select_best_reader();
+
+ std::unordered_map<InvertedIndexReaderType, InvertedIndexReaderPtr>
_readers;
};
+// class InvertedIndexIterator : public IndexIterator {
Review Comment:
remove
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]