yiguolei commented on code in PR #62960:
URL: https://github.com/apache/doris/pull/62960#discussion_r3214279568
##########
be/src/storage/index/inverted/inverted_index_reader.cpp:
##########
@@ -289,13 +371,13 @@ Status
FullTextIndexReader::new_iterator(std::unique_ptr<IndexIterator>* iterato
}
Status FullTextIndexReader::query(const IndexQueryContextPtr& context,
- const std::string& column_name, const void*
query_value,
+ const std::string& column_name, const Field&
query_value,
InvertedIndexQueryType query_type,
std::shared_ptr<roaring::Roaring>& bit_map,
const InvertedIndexAnalyzerCtx*
analyzer_ctx) {
SCOPED_RAW_TIMER(&context->stats->inverted_index_query_timer);
- std::string search_str = *reinterpret_cast<const
std::string*>(query_value);
+ std::string search_str = query_value.get<PrimitiveType::TYPE_STRING>();
Review Comment:
typename PrimitiveTypeTraits<T>::CppType& Field::get() { 去把field
里这个函数的定义改一下,里面加一个检查,当t != type的时候抛异常把
--
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]