airborne12 commented on code in PR #71215:
URL: https://github.com/apache/doris/pull/71215#discussion_r4808603311
##########
be/src/exprs/vmatch_predicate.cpp:
##########
@@ -247,8 +251,16 @@ Status VMatchPredicate::execute_column_impl(VExprContext*
context, const Block*
// prepare a column to save result
temp_block.insert({nullptr, _data_type, _expr_name});
- RETURN_IF_ERROR(_function->execute(context->fn_context(_fn_context_index),
temp_block,
- arguments, num_columns_without_result,
temp_block.rows()));
+ // Rows match as the index of their tablet would, inside the segment and
in the scanner alike.
+ // Above the scanner the tablet is unknown, and the rows keep the CLucene
element spacing.
+ auto* fn_context = context->fn_context(_fn_context_index);
+ const bool snii_rows =
+ context->inverted_index_storage_format() ==
InvertedIndexStorageFormatPB::SNII;
Review Comment:
Confirmed and fixed in cf4ad929512 (together with a null-tablet guard in
`OlapScanner`'s constructor for `ScannerContextTest.test_init`).
- `Reusable::init` now records `schema.get_inverted_index_storage_format()`
and sets it on every context in `_output_exprs_ctxs` (which
`VMysqlResultWriter::write` executes directly without cloning).
- `PointQueryExecutor::init` checks
`cache_handle->inverted_index_storage_format()` against the target tablet's
format alongside timezone and locale, so prepared queries crossing V2 and SNII
partitions rebuild `Reusable` (and request query-context resend on lightweight
prepared requests) without mutating any in-flight `Reusable` instance.
Tests:
- `ReusableTest.OutputExprsFollowTabletInvertedIndexFormat` checks
`NOT(array(s, 'world') MATCH_PHRASE 'hello world')` through `Reusable::init`
across `SNII` and `V2` tablet schemas.
-
`PointQueryIndexFormatTest.PreparedLookupRebuildsReusableAcrossV2AndSniiTablets`
drives `PointQueryExecutor::init` and `lookup_up()` on real V2 and SNII MOW
row-store tablets under a shared prepared UUID (covering V2 cache seed,
lightweight resend on SNII, full SNII rebuild without mutating the retained V2
`Reusable`, and warm SNII cache hit). Fails before the fix and passes after.
- No handwritten `.out` regression was added without a local cluster in this
worktree (`AGENTS.md` forbids handwritten `.out` files).
--
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]