Repository navigation
[fix](regression) Pin the VARIANT subcolumn limit in test_match_keyword_score - #70151
Conversation
…rd_score ### What problem does this PR solve? Issue Number: None Related PR: apache#69790 Problem Summary: inverted_index_p0/test_match_keyword_score, added by apache#69790, has failed in P0 since it merged, always on the VARIANT part of the first loop pass: Check tag 'V2_variant_sparse_path' failed, line 1, DOUBLE result mismatch. Expect cell is: 0.980829 But real is : 0 (once in cloud_p0: V2_variant_text_path, 0.693147 vs 0). The suite expects every VARIANT path (n, s, p) to be a materialized subcolumn with its own inverted index. CI runs with use_fuzzy_session_variable, and SessionVariable.initFuzzyModeVariables sets default_variant_max_subcolumns_count to random.nextInt(10) on each new connection (0 when it picks doc mode). The suite already pinned default_variant_enable_typed_paths_to_sparse and default_variant_enable_doc_mode, but not this limit. With a limit of 1, the writer keeps only the top path of each segment (s, by the path tie-break) and moves n and p to the sparse column. The sparse column has no inverted index, so MATCH on those paths runs without the index and scores 0. The numeric path loses its score as well (row 4: 0.287682 -> 0), but OutputUtils accepts that mismatch: when the cells have different numbers of decimal places, it rounds 0.287682 to "0" places, which gives 0. So the suite fails only at the sparse path, whose score is 0.98. Reproduced on a local cluster: with SET GLOBAL default_variant_max_subcolumns_count = 1, the unchanged suite fails with exactly the CI message. Limits 0 and 2-9 pass. Fix: set default_variant_max_subcolumns_count = 0 (no limit) next to the other two pinned VARIANT defaults. The expected output does not change. ### Release note None ### Check List (For Author) - Test: Regression test - test_match_keyword_score on a local cluster: before the fix it fails with the CI message under a forced limit of 1; after the fix it passes under that limit and with the default. - Behavior changed: No - Does this need documentation: No Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: Selected model is at capacity. Please try a different model. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
|
/review |
|
Codex automated review failed and did not complete. Error: Selected model is at capacity. Please try a different model. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
|
/review |
There was a problem hiding this comment.
No actionable findings in the complete one-file diff at head 6fd346a. The added session SET pins the VARIANT extraction limit before each CREATE TABLE, preserving indexed n/s/p paths and the intended score expectations under fuzzy session defaults.
Critical checkpoint conclusions:
- Goal/correctness: the session default is read during VARIANT type creation; zero retains all dynamic paths in the writer. The existing regression checks the resulting indexed scores; runtime reproduction was not performed for this review.
- Scope/reuse: one existing SET and its explanatory comment, beside the existing VARIANT pins, are focused and sufficient.
- Concurrency/locks: no concurrent work or locks added; the SET is session scoped on the suite's reused connection.
- Lifecycle/static initialization: connection cleanup contains the setting within the suite; no new resource ownership or static initialization.
- Configuration: an existing dynamically settable default is pinned; no new configuration or restart requirement.
- Compatibility: no symbols, storage formats, or upgrade behavior changed.
- Thrift/protobuf: no definition changes; cross-branch field-id checks are inapplicable.
- Parallel paths: the common V2/V3/SNII loop applies the pin to every VARIANT fixture; the inspected metadata/writer path does not introduce a cloud-specific exception.
- Conditions: no new branch; the comment explains the indexed-subcolumn prerequisite and unlimited value.
- Tests: existing ordered regression checks retain MATCH/SEARCH, numeric/text/missing-segment VARIANT paths, and cached BKD coverage for all three formats. No new kernel feature or negative path is added.
- Expected results: unchanged; the fix restores fixture materialization rather than changing expected scores.
- Observability/errors: existing SQL logging and exception propagation suffice; no new runtime path needs metrics.
- Transactions/persistence: no EditLog, replay, failover, or persistence logic changed.
- Writes/atomicity: existing fixture writes are preserved; production transaction and crash behavior are unchanged.
- FE/BE variables: no new variable or wire field; the existing setting is forwarded and carried through column metadata.
- Performance/memory: unlimited extraction is bounded to this four-row, three-path fixture; no production hot path changes.
- Other/core invariants: no introduced visibility, version, delete-bitmap, memory-ownership, or silent-error issue found.
User focus: none supplied. Existing inline findings: none. The pre-existing floating-point comparison behavior described in the PR is unchanged and is not a finding against this patch.
Coverage: complete static review of the supplied diff, suite and expected output, session/fuzz lifecycle, CREATE-time defaults, metadata propagation, and writer selection, with separate general and risk-focused reviews. No unresolved static coverage questions. No builds, tests, benchmarks, source changes, or runtime validation were performed.
Review converged after 1 round(s).
Keep both test compile definitions in be/test/CMakeLists.txt: the Kuromoji dictionary path from apache#70555 and the SNII golden corpus path from apache#68607. Use the debug_variant_* session variables in test_match_keyword_score, since apache#70609 renamed default_variant_*. Keep the subcolumn limit pin from apache#70151. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What problem does this PR solve?
Issue Number: None
Related PR: #69790
Problem Summary: inverted_index_p0/test_match_keyword_score, added by #69790, has
failed in P0 since it merged, always on the VARIANT part of the first loop pass:
(once in cloud_p0: V2_variant_text_path, 0.693147 vs 0).
The suite expects every VARIANT path (n, s, p) to be a materialized subcolumn
with its own inverted index. CI runs with use_fuzzy_session_variable, and
SessionVariable.initFuzzyModeVariables sets default_variant_max_subcolumns_count
to random.nextInt(10) on each new connection (0 when it picks doc mode). The suite
already pinned default_variant_enable_typed_paths_to_sparse and
default_variant_enable_doc_mode, but not this limit. With a limit of 1, the
writer keeps only the top path of each segment (s, by the path tie-break) and
moves n and p to the sparse column. The sparse column has no inverted index, so
MATCH on those paths runs without the index and scores 0.
The numeric path loses its score as well (row 4: 0.287682 -> 0), but
OutputUtils accepts that mismatch: when the cells have different numbers of
decimal places, it rounds 0.287682 to "0" places, which gives 0. So the suite
fails only at the sparse path, whose score is 0.98.
Reproduced on a local cluster: with SET GLOBAL default_variant_max_subcolumns_count = 1,
the unchanged suite fails with exactly the CI message. Limits 0 and 2-9 pass.
Fix: set default_variant_max_subcolumns_count = 0 (no limit) next to the other
two pinned VARIANT defaults. The expected output does not change.
Release note
None
Check List (For Author)
CI message under a forced limit of 1; after the fix it passes under that
limit and with the default.
🤖 Generated with Claude Code