zhangstar333 commented on code in PR #67289:
URL: https://github.com/apache/doris/pull/67289#discussion_r3964399669
##########
be/src/format_v2/table/lance_reader.cpp:
##########
@@ -561,6 +689,41 @@ Status LanceTableReader::_open_dataset(const DatasetKey&
key) {
return Status::OK();
}
+Status LanceTableReader::_prepare_fts_query_context() {
+ DORIS_CHECK(_dataset != nullptr);
+ DORIS_CHECK(_fts_query_context == nullptr);
+ DORIS_CHECK(_scan_params != nullptr);
+ const auto& full_text =
+
_scan_params->lance_scan_params.external_search_request.search_query.full_text_search;
+ if (full_text.__isset.global_statistics) {
+ return Status::NotSupported(
+ "Lance FE-provided FTS global statistics require a lance-c
consumer API");
+ }
+ const auto coverage_mode = full_text.coverage_mode ==
TFtsCoverageMode::STRICT
+ ? LANCE_FTS_COVERAGE_STRICT
+ : LANCE_FTS_COVERAGE_INDEX_ONLY;
+ // Keep statistics preparation at the reader/scanner lifetime today. A
future FE-provided
+ // opaque statistics payload should enter through this boundary and create
the same context,
+ // leaving segment-scoped scanner execution unchanged.
+ if (full_text.query_type == TFtsQueryType::MATCH) {
+ const auto match_operator = full_text.match_operator ==
TFtsMatchOperator::AND
+ ? LANCE_FTS_MATCH_OPERATOR_AND
+ : LANCE_FTS_MATCH_OPERATOR_OR;
+ _fts_query_context = lance_dataset_prepare_fts_match_query(
Review Comment:
if have delete some rows cause the global score is not correct. maybe need
fixed it in lance rust later
--
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]