You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract Vector::wrap_storage and use it at four call sites
The two-line `ExtDType::<Vector>::try_new(EmptyMetadata, storage.dtype().clone()) +
ExtensionArray::new(ext_dtype, storage).into_array()` incantation for
wrapping a storage array in a [`Vector`] extension appeared verbatim in:
- `compress::wrap_padded_as_vector` (private, used twice)
- `sorf_transform::vtable` (empty-array branch + `inverse_rotate_typed`)
- `vector_search::build_constant_query_vector`
Promote it to `Vector::wrap_storage(storage)`, an associated function on
the [`Vector`] vtable struct that is the natural home for the operation.
Each call site drops to a single line and the `ExtDType`/`EmptyMetadata`
imports go away where they were only pulled in for this pattern. The old
private helper is deleted.
Signed-off-by: Claude <noreply@anthropic.com>
0 commit comments