Skip to content

feat: memoize for FFI_PartitionEvaluator#22659

Open
sandugood wants to merge 4 commits into
apache:mainfrom
sandugood:feat/ffi-partition-evaluator
Open

feat: memoize for FFI_PartitionEvaluator#22659
sandugood wants to merge 4 commits into
apache:mainfrom
sandugood:feat/ffi-partition-evaluator

Conversation

@sandugood
Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

Before this change there was no reasonable memoize for the ForeignPartitionEvaluator

What changes are included in this PR?

  1. Added memoize function pointer to FFI_PartitionEvaluator struct and implemented the FFI wrapper memoize_fn_wrapper that serializes/deserializes WindowAggState across the boundary

  2. Implemented PartitionEvaluator::memoize for ForeignPartitionEvaluator, preserving window_frame_ctx (which cannot cross FFI) across the call

Are these changes tested?

Yes, tested both state preservation with test_memoize_state_preservation and window_frame_ctx preservation with test_memoize_preserves_window_frame_ctx. All of the other tests in the crate also pass

Are there any user-facing changes?

Yes, but only behavioral — no API changes.

@github-actions github-actions Bot added the ffi Changes to the ffi crate label May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ffi Changes to the ffi crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FFI: FFI_PartitionEvaluator missing memoize

1 participant