Repository navigation
Intra-fragment ZoneMap pruning for Spark reads #811
majin1102
started this conversation in
Design Proposals
Replies: 1 comment
|
@hamersaw @jackye1995 @LuciferYang Could you take a look to the dependent lance-format/lance#8951 and lance-format/lance#9034 when you have a chance? Would love to hear your thoughts. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm working on improving ZoneMap pruning for Spark reads.
Background
lance-sparkalready loads ZoneMap statistics on the driver, but currently reduces the result to surviving fragment IDs. More precise information—physical row ranges inside a fragment—is discarded.As a result, Spark cannot pass intra-fragment pruning results to executors. The native scanner may also query the same ZoneMap again when processing the original filter.
Proposal
Preserve the driver-side ZoneMap result as fragment-local physical slices:
FragmentSlicedescribes a physical row interval within a fragment. It is called a slice rather than a split because it narrows an existing Spark task instead of creating a new task.The original filter is always evaluated by Lance. Unsupported predicates, incomplete index coverage, or invalid ZoneMap metadata conservatively fall back to a full-fragment scan.
Related work
FragmentSlicescanner API. Lance intersects physical slices with deletion vectors, scalar-index results, and the original filter.LanceSplitto normal reads andCOUNT(*).use_scalar_index = false, which disables all scalar indices. It addsignoredScalarIndicesso executors can skip only the ZoneMap already consumed by the driver while continuing to use other indices, such as BTree.All reactions