Repository navigation
Add PIVCO compute pushdown kernels and fused ZigZag execution - #12356
lwwmanning wants to merge 1 commit into
Conversation
Adds direct spine-walking CompareKernel predicate pushdown, block-skipping SliceReduce, FilterKernel, TakeExecute, and fused ZigZag(Pivco) parent execution, verified via Hegel check_encoding_roundtrip_and_ops and ZigZag(Pivco) property tests. Co-Authored-By: Antigravity <noreply@google.com> Signed-off-by: Will Manning <will@willmanning.io>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc26810de2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| impl SliceReduce for Pivco { | ||
| fn slice(array: ArrayView<'_, Self>, range: Range<usize>) -> VortexResult<Option<ArrayRef>> { | ||
| let validity = Self::validity(array)?.slice(range.clone())?; | ||
| let data = array.data().slice(array.len(), range.clone())?; | ||
| Ok(Some( |
There was a problem hiding this comment.
Keep slice reduction free of buffer reads
When the Pivco buffers are host-resident, this SliceReduce implementation calls PivcoData::slice, which reads entries from block_headers to trim the payloads. SliceReduce is explicitly the metadata-only path and is invoked during optimizer reduction through the rule registered in lib.rs; buffer-reading implementations belong in SliceKernel. Preserve the existing payloads and base offsets as the device path already does, or register this as an execute kernel, so logical reduction cannot synchronously inspect array data.
Useful? React with 👍 / 👎.
lwwmanning
left a comment
There was a problem hiding this comment.
Posted by Claude Opus 5.5 on Will's behalf.
I read the compare pushdown against decode-then-compare and found no wrong result. I checked Eq and NotEq on absent symbols and on values of 32 or more. I also checked the four ordering operators at 0 and u64::MAX, negative signed constants, null lhs rows, and slices with a non-zero offset. I read take and filter for null indices, sliced offsets and empty input, and found no mismatch.
The Codex comment on SliceReduce is right. The trait contract says the reduce must not read buffers, but the host branch of PivcoData::slice reads two block headers. The device branch already keeps the payloads and base offsets and slices only the header handle. The host branch can do the same.
That change costs nothing. slice_with_alignment is zero-copy, so trimming on host frees no memory. Serialize already trims, and test_untrimmed_windowed_slice_trims_on_serialize covers that. The change removes about 45 lines.
take_ordered_blocks repeats take_scattered_blocks. The grouped path gives the same result for sorted indices, at the cost of two small index vectors. Please remove the ordered path, or keep it only if a bench shows a gain.
SCALAR_BLOCK_HIT_THRESHOLD = 4 and FULL_ARRAY_DECODE_RATIO = 8 have no measurement. The benches in #12358 run take and filter only at 1%. One line with the crossover numbers would justify both values.
The x86 gap from #12355 also applies here. pack_64_bytes01_avx2 has not run in CI.
Stacked on #12355
Adds direct compute pushdown kernels for
PivcoArray: spine-walkingCompareKernelon order-preserving trees (resolving range predicates without decoding values), block-skippingSliceReduce,FilterKernel,TakeExecute, and fusedZigZag(Pivco)parent execution. Verified withhegeltestproperty tests coveringcheck_encoding_roundtrip_and_opsand fusedZigZag(Pivco)compute parity against canonical arrays.Authored with AI assistance.