Skip to content

perf(index): deduplicate identical leaves and bound concurrency in ScalarIndexExpr - #11176

Merged
Xuanwo merged 4 commits into
lance-format:mainfrom
jischeng:perf/issue-11155-scalar-expr-cse
Dec 1, 2026
Merged

Xuanwo merged 4 commits into
lance-format:mainfrom
jischeng:perf/issue-11155-scalar-expr-cse

Conversation

@jischeng

@jischeng jischeng commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #11155

Summary

Root Cause

  1. ScalarIndexExpr::optimize left contiguous Or trees unbalanced and did not deduplicate repeated disjuncts or exact duplicate conjuncts.
  2. ScalarIndexExpr::evaluate_with_options evaluated And / Or via unbounded recursive try_join!, re-loading and re-searching identical repeated leaves (e.g., grp = 'hot_grp' / 'cold_grp' across 256 OR branches), keeping hundreds of full-dataset RowAddrTreeMap masks live concurrently, and evaluating wide predicates unconditionally alongside narrow/empty conjuncts.
  3. ScopedScalarIndexLoader did not bound physical-address leaf hits to fragment_scope when a shared index segment matched out-of-scope fragments, and fragments_covered_by_index_query walked duplicate index references repeatedly.

Changes

  • Borrowed-RHS 3VL algebra (lance-select):
    • Added BitAnd<&Self> and BitOr<&Self> on NullableRowAddrMask (BitAndAssign<&Self> / BitOrAssign<&Self> on NullableRowAddrSet), mutating self in place without cloning rhs while preserving SQL Kleene three-valued logic.
    • Added BitAnd<&Self> and BitOr<&Self> on NullableIndexExprResult, retaining #11012 MaskDomain invariants and #11552 single-mask fast paths when self.exact && rhs.exact.
  • Expression optimization (lance-index):
    • Updated ScalarIndexExpr::optimize with iterative contiguous Or flattening, first-seen-order disjunct deduplication, and balanced rebuild_or_tree (O(log2 N) depth).
    • Made collect_and_leaves and needs_recheck iterative and deduplicated exact duplicate conjuncts in optimize_and_leaves.
  • Evaluation engine (rust/lance-index/src/scalar/eval.rs):
    • Pre-evaluation iterative duplicate-only leaf CSE pass allocating CseSlot (OnceCell for native and reconciled RowAddress results) only for leaves appearing >= 2 times under (column, index_name, index_type, needs_recheck, track_nulls, query); unique leaves (count == 1) bypass caching so bitmaps drop immediately after folding.
    • Expression-wide unique leaf search budget (MAX_LEAF_SEARCH_CONCURRENCY = 32) enforced via a per-evaluation semaphore acquired strictly when a unique leaf search starts (eval_search): parent Not / And / Or nodes awaiting children and duplicate CSE callers awaiting an in-flight OnceCell consume zero slots.
    • Selective-first And ordering (ConjunctPriority), track_nulls-aware short-circuiting, and 3-phase And evaluation: (1) zero-I/O drain of ready CSE leaves, (2) lone initial selective probe, and (3) bounded tail overlap (MAX_AND_CONCURRENCY = 8, MAX_NESTED_AND_CONCURRENCY = 4 under Or), plus MAX_OR_CONCURRENCY = 8 incremental Or folding.
    • Preserved native MaskDomain::RowAddress / MaskDomain::RowId on leaves (#11012), reconciling mixed domains lazily via ScalarIndexLoader::row_id_result_to_row_addrs with per-slot memoization and cooperative polling (drive_with_in_flight).
  • Fragment-scoped index loading & coverage (lance):
    • Retained #11045 per-segment coverage in open_scalar_index_segments / LogicalScalarIndex and wrapped subset-scoped physical-address indices in FragmentScopedScalarIndex so selected and nulls are restricted via retain_fragments while preserving native domains and Exact / AtMost / AtLeast bounds.
    • Deduplicated (column, index_name) pairs iteratively in ScalarIndexExec::fragments_covered_by_index_query.

Benchmark (lance#11155 repeated-leaf comparison vs rebased main 1b778e120)

Fixture: 2,000,000 rows across 40 fragments (50,000 rows/frag) with item_id BTree, grp Bitmap, and ts BTree; 256-branch composite OR (grp = 'hot_grp'|'cold_grp' AND item_id = ... AND ts >= ... AND ts <= ...). Measured against rebased parent 1b778e120 (includes #11042 bitmap read coalescing, #11045, #11012, and #11552), --profile release-with-debug, median of 5 fresh child processes (all modes returned exact [("item_0_0", 0)]):

Mode Scope Variant Median (ms) RSS delta (MB) parts_loaded index_comparisons
enable_stable_row_ids=false fragments=[frag0] main (1b778e120) 415.77 +328.28 214 3,138,944
enable_stable_row_ids=false fragments=[frag0] This PR 117.71 (-71.7%) +83.85 (-74.5%) 213 1,098,881
enable_stable_row_ids=false Full dataset (40 frags) main (1b778e120) 403.38 +330.80 214 3,138,944
enable_stable_row_ids=false Full dataset (40 frags) This PR 184.32 (-54.3%) +89.83 (-72.8%) 214 3,138,690
enable_stable_row_ids=true fragments=[frag0] main (1b778e120) 386.27 +324.24 214 3,138,944
enable_stable_row_ids=true fragments=[frag0] This PR 114.09 (-70.5%) +81.53 (-74.9%) 213 1,098,881
enable_stable_row_ids=true Full dataset (40 frags) main (1b778e120) 412.16 +303.69 214 3,138,944
enable_stable_row_ids=true Full dataset (40 frags) This PR 175.48 (-57.4%) +89.30 (-70.6%) 214 3,138,690

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-index Vector index, linalg, tokenizer performance labels Nov 17, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. K-risk Latest Gatekeeper recommendation includes a non-blocking risk. labels Nov 17, 2026
@jischeng
jischeng force-pushed the perf/issue-11155-scalar-expr-cse branch from 12b3b99 to 6a0e612 Compare November 17, 2026 16:45
@lance-gatekeeper lance-gatekeeper Bot removed K-approved Latest Gatekeeper recommendation permits acceptance. K-risk Latest Gatekeeper recommendation includes a non-blocking risk. labels Nov 17, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 17, 2026
Xuanwo
Xuanwo previously requested changes Nov 28, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-assisted review of 6a0e6128

The comment on MAX_NESTED_AND_CONCURRENCY in eval.rs promises at most 32 simultaneous leaf searches. Each nested node has its own limit. The CI wheel produced a nested plan for an ordinary predicate, and a separate test of the extracted scheduler with controlled mock leaves recorded 40 pending searches.

Please enforce the budget across one expression where a unique leaf search starts. Parent nodes awaiting children and duplicate callers awaiting a cached result should consume no slots. Preserve the selective first probe and allow independent searches to overlap. A deterministic nested regression should count pending unique searches and check the documented maximum.

The trial merge with main conflicts in expression.rs, result.rs, and scalar_index.rs. When rebasing, please retain per-segment coverage, native row-address and row-ID domains, and exact-mask handling from #11045, #11012, and #11552. Please rerun the correctness cases and a focused repeated-leaf comparison against the rebased parent so the measurement includes the read coalescing from #11042.

@jischeng
jischeng force-pushed the perf/issue-11155-scalar-expr-cse branch from 6a0e612 to 2904832 Compare November 28, 2026 14:04
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 28, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

The budget now spans the whole expression and addresses the nested-concurrency concern, while retaining selective probing and overlapping tail searches. The rebase preserves NULL/NOT behavior, native mask domains, per-segment coverage, and conservative result bounds. Leaf reuse still reduces search and mask work with the read coalescing from #11042 already present.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 28, 2026
@Xuanwo
Xuanwo dismissed their stale review November 28, 2026 15:05

Verified the shared leaf-search budget on 2904832. The hosted nested-expression regression fills all 32 slots without exceeding the limit and covers duplicate waiters and cancellation.

@jischeng

Copy link
Copy Markdown
Contributor Author

Thanks @Xuanwo for the review! Addressed in 2904832cc (rebased onto 1b778e120):

  1. Expression-wide unique leaf search budget (MAX_LEAF_SEARCH_CONCURRENCY = 32):

    • Added a per-evaluation Semaphore on EvalContext acquired only when a unique leaf search starts (eval_search — inside OnceCell::get_or_try_init for CSE leaves, and directly before eval_search for unique leaves). Parent Not / And / Or nodes awaiting children and duplicate CSE callers awaiting a cached result consume zero slots, while selective first probing and independent tail overlap are preserved.
    • Added deterministic regression test_nested_leaf_search_budget_enforced_across_expression (plus test_mixed_domain_cse_async_remap_does_not_deadlock) verifying lone first-probe execution (max_in_flight == 1), empty-probe short-circuiting (search_calls == 1), concurrent overlap capped strictly at 32 across a 48-leaf nested CNF plan and multi-level CSE waiters, and CSE leader cancellation under a saturated 32-slot budget.
  2. Rebase onto main (1b778e120, retaining #11045, #11012, #11552, and #11042):

    • Retained per-segment SegmentCoverage in open_scalar_index_segments / LogicalScalarIndex (#11045), native MaskDomain::RowAddress / MaskDomain::RowId with lazy row_id_result_to_row_addrs reconciliation (#11012), and exact-mask single-bound fast paths in NullableIndexExprResult (#11552).
    • Re-ran the correctness suites and the #11155 2M-row / 40-fragment / 256-branch repeated-leaf comparison against 1b778e120 (with #11042 bitmap read coalescing reducing baseline parts_loaded from 468 to 214; --profile release-with-debug, median of 5 fresh processes):
Mode Scope main (1b778e120) This PR (2904832cc) RSS delta (main -> PR) parts_loaded (main -> PR)
stable_row_ids=false frag0 415.8 ms 117.7 ms (-71.7%) +328.3 -> +83.9 MB 214 -> 213
stable_row_ids=false 40 frags 403.4 ms 184.3 ms (-54.3%) +330.8 -> +89.8 MB 214 -> 214
stable_row_ids=true frag0 386.3 ms 114.1 ms (-70.5%) +324.2 -> +81.5 MB 214 -> 213
stable_row_ids=true 40 frags 412.2 ms 175.5 ms (-57.4%) +303.7 -> +89.3 MB 214 -> 214

Use the bounded scalar evaluator for typed prefilters while keeping a single mask for exact results. Preserve filter depth checks, segment coverage, and deletion-aware stable row ID translation.
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Dec 1, 2026
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
12154 2 12152 0
View the top 2 failed test(s) by shortest run time
lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_2_wrapped_stream
Stack Traces | 0.511s run time
thread 'io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_2_wrapped_stream' (101756) panicked at .../io/exec/utils.rs:1749:9:
assertion `left == right` failed
  left: BlockList(RowAddrTreeMap { inner: {0: Partial(RoaringBitmap<[4]>)} })
 right: BlockList(RowAddrTreeMap { inner: {0: Partial(RoaringBitmap<[2, 4, 10]>)} })
stack backtrace:
   0: __rustc::rust_begin_unwind
             at .../std/src/panicking.rs:679:5
   1: core::panicking::panic_fmt
             at .../core/src/panicking.rs:80:14
   2: core::panicking::assert_failed_inner
             at .../core/src/panicking.rs:439:17
   3: core::panicking::assert_failed::<lance_select::mask::RowAddrMask, lance_select::mask::RowAddrMask>
             at .../core/src/panicking.rs:394:5
   4: {async_fn#0}
             at ..../io/exec/utils.rs:1749:9
   5: {async_block#0}
             at ..../io/exec/utils.rs:1624:5
   6: poll<&mut dyn core::future::future::Future<Output=()>>
             at .../src/future/future.rs:133:9
   7: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:830:70
   8: with_budget<core::task::poll::Poll<()>, tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure#0}::{closure#0}::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../task/coop/mod.rs:167:5
   9: budget<core::task::poll::Poll<()>, tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure#0}::{closure#0}::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../task/coop/mod.rs:133:5
  10: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:830:25
  11: <tokio::runtime::scheduler::current_thread::Context>::enter::<core::task::poll::Poll<()>, <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}::{closure#0}>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:486:19
  12: <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:829:44
  13: <tokio::runtime::scheduler::current_thread::CoreGuard>::enter::<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:906:68
  14: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<<tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../runtime/context/scoped.rs:40:9
  15: tokio::runtime::context::set_scheduler::<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/context.rs:186:38
  16: try_with<tokio::runtime::context::Context, tokio::runtime::context::set_scheduler::{closure_env#0}<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core, alloc::alloc::Global>, core::option::Option<()>), tokio::runtime::scheduler::current_thread::{impl#9}::enter::{closure_env#0}<tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>, core::option::Option<()>>>, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core, alloc::alloc::Global>, core::option::Option<()>)>
             at .../src/thread/local.rs:463:12
  17: <std::thread::local::LocalKey<tokio::runtime::context::Context>>::with::<tokio::runtime::context::set_scheduler<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
             at .../src/thread/local.rs:427:20
  18: tokio::runtime::context::set_scheduler::<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/context.rs:186:17
  19: <tokio::runtime::scheduler::current_thread::CoreGuard>::enter::<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:906:27
  20: <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:819:24
  21: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:216:33
  22: tokio::runtime::context::runtime::enter_runtime::<<tokio::runtime::scheduler::current_thread::CurrentThread>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, ()>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../runtime/context/runtime.rs:65:16
  23: block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:204:9
  24: <tokio::runtime::runtime::Runtime>::block_on_inner::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/runtime.rs:379:52
  25: block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/runtime.rs:348:18
  26: case_2_wrapped_stream
             at ..../io/exec/utils.rs:1624:5
  27: lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_2_wrapped_stream::{closure#0}
             at ..../io/exec/utils.rs:1624:14
  28: <lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_2_wrapped_stream::{closure#0} as core::ops::function::FnOnce<()>>::call_once
             at .../src/ops/function.rs:250:5
  29: <fn() -> core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once
             at .../src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_1_direct
Stack Traces | 0.512s run time
thread 'io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_1_direct' (101757) panicked at .../io/exec/utils.rs:1749:9:
assertion `left == right` failed
  left: BlockList(RowAddrTreeMap { inner: {0: Partial(RoaringBitmap<[4]>)} })
 right: BlockList(RowAddrTreeMap { inner: {0: Partial(RoaringBitmap<[2, 4, 10]>)} })
stack backtrace:
   0: __rustc::rust_begin_unwind
             at .../std/src/panicking.rs:679:5
   1: core::panicking::panic_fmt
             at .../core/src/panicking.rs:80:14
   2: core::panicking::assert_failed_inner
             at .../core/src/panicking.rs:439:17
   3: core::panicking::assert_failed::<lance_select::mask::RowAddrMask, lance_select::mask::RowAddrMask>
             at .../core/src/panicking.rs:394:5
   4: {async_fn#0}
             at ..../io/exec/utils.rs:1749:9
   5: {async_block#0}
             at ..../io/exec/utils.rs:1624:5
   6: poll<&mut dyn core::future::future::Future<Output=()>>
             at .../src/future/future.rs:133:9
   7: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:830:70
   8: with_budget<core::task::poll::Poll<()>, tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure#0}::{closure#0}::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../task/coop/mod.rs:167:5
   9: budget<core::task::poll::Poll<()>, tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure#0}::{closure#0}::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../task/coop/mod.rs:133:5
  10: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:830:25
  11: <tokio::runtime::scheduler::current_thread::Context>::enter::<core::task::poll::Poll<()>, <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}::{closure#0}>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:486:19
  12: <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:829:44
  13: <tokio::runtime::scheduler::current_thread::CoreGuard>::enter::<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:906:68
  14: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<<tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../runtime/context/scoped.rs:40:9
  15: tokio::runtime::context::set_scheduler::<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/context.rs:186:38
  16: try_with<tokio::runtime::context::Context, tokio::runtime::context::set_scheduler::{closure_env#0}<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core, alloc::alloc::Global>, core::option::Option<()>), tokio::runtime::scheduler::current_thread::{impl#9}::enter::{closure_env#0}<tokio::runtime::scheduler::current_thread::{impl#9}::block_on::{closure_env#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>, core::option::Option<()>>>, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core, alloc::alloc::Global>, core::option::Option<()>)>
             at .../src/thread/local.rs:463:12
  17: <std::thread::local::LocalKey<tokio::runtime::context::Context>>::with::<tokio::runtime::context::set_scheduler<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
             at .../src/thread/local.rs:427:20
  18: tokio::runtime::context::set_scheduler::<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>::{closure#0}>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/context.rs:186:17
  19: <tokio::runtime::scheduler::current_thread::CoreGuard>::enter::<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, core::option::Option<()>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:906:27
  20: <tokio::runtime::scheduler::current_thread::CoreGuard>::block_on::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:819:24
  21: {closure#0}<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:216:33
  22: tokio::runtime::context::runtime::enter_runtime::<<tokio::runtime::scheduler::current_thread::CurrentThread>::block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>::{closure#0}, ()>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../runtime/context/runtime.rs:65:16
  23: block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../scheduler/current_thread/mod.rs:204:9
  24: <tokio::runtime::runtime::Runtime>::block_on_inner::<core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/runtime.rs:379:52
  25: block_on<core::pin::Pin<&mut dyn core::future::future::Future<Output=()>>>
             at .................................................../home/runner/.cargo.................................................../registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.54..../src/runtime/runtime.rs:348:18
  26: case_1_direct
             at ..../io/exec/utils.rs:1624:5
  27: lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_1_direct::{closure#0}
             at ..../io/exec/utils.rs:1624:14
  28: <lance::io::exec::utils::tests::scoped_scalar_prefilter_reads_only_scoped_deletions::case_1_direct::{closure#0} as core::ops::function::FnOnce<()>>::call_once
             at .../src/ops/function.rs:250:5
  29: <fn() -> core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once
             at .../src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Keep hits from selected segments when negation can turn them into block-list exclusions. Apply fragment scope to allow lists before resolving stable row IDs.
@Xuanwo
Xuanwo merged commit 253044c into lance-format:main Dec 1, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-index Vector index, linalg, tokenizer performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(index): deduplicate identical leaves and bound concurrent evaluation in ScalarIndexExpr

2 participants