Skip to content

[core][spark] Flatten scored global index result unions#8809

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:flatten-scored-index-unions
Open

[core][spark] Flatten scored global index result unions#8809
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:flatten-scored-index-unions

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Repeated ScoredGlobalIndexResult.or calls build a linear ScoreGetter chain. When aggregating many index splits, top-k selection or serialization may recurse through thousands of getters, causing StackOverflowError and retaining intermediate bitmaps.

Add a bulk merge operation that materializes a flat row-ID/score result, and use it across common, data-evolution, and Spark aggregation paths while preserving first-result score precedence.

Tests

  • ScoredGlobalIndexResultTest
  • SparkDataEvolutionVectorReadTest
  • Multi-index-file vector, batch-vector, and full-text tests

Repeated ScoredGlobalIndexResult.or calls build a linear ScoreGetter
chain. Aggregating many split results can recurse through the full chain
during top-k selection or serialization and overflow the stack while
retaining intermediate bitmaps.

Materialize multi-result unions into a flat row-ID and score result, use
it across common, data-evolution, and Spark aggregation paths, and add
regression coverage for large split counts.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant