Skip to content

Commit 7accd56

Browse files
committed
Fix optional scheme trait methods and documentation links
Restore produced_encodings in feature-gated schemes and fix stale trait links. Document scheme ID resolution for Clippy. Signed-off-by: Matt Katz <mhkatz97@gmail.com>
1 parent 1752d46 commit 7accd56

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎vortex-btrblocks/src/builder/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl BtrBlocksCompressorBuilder {
231231
/// call.
232232
///
233233
/// At build time, each scheme is replaced by the newest version in its predecessor chain
234-
/// whose [`required_serialized_ids`](Scheme::required_serialized_ids) are all permitted.
234+
/// whose [`produced_encodings`](Scheme::produced_encodings) are all permitted.
235235
/// Schemes with no eligible version are removed. This also applies to schemes added after
236236
/// this call. The file writer passes the serialized IDs its enabled editions permit.
237237
pub fn allow_serialized_ids(mut self, allowed: &HashSet<ArrayId>) -> Self {

‎vortex-btrblocks/src/schemes/binary/zstd_buffers.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Scheme for ZstdBuffersScheme {
3131
canonical.dtype().is_binary()
3232
}
3333

34-
fn required_serialized_ids(&self) -> Vec<ArrayId> {
34+
fn produced_encodings(&self) -> Vec<ArrayId> {
3535
vec![vortex_zstd::ZstdBuffers.id()]
3636
}
3737

‎vortex-btrblocks/src/schemes/integer/delta.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Scheme for DeltaScheme {
9797
canonical.dtype().is_int()
9898
}
9999

100-
fn required_serialized_ids(&self) -> Vec<ArrayId> {
100+
fn produced_encodings(&self) -> Vec<ArrayId> {
101101
vec![Delta.id()]
102102
}
103103

‎vortex-btrblocks/src/schemes/string/onpair.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Scheme for OnPairScheme {
5050
canonical.dtype().is_utf8()
5151
}
5252

53-
fn required_serialized_ids(&self) -> Vec<ArrayId> {
53+
fn produced_encodings(&self) -> Vec<ArrayId> {
5454
vec![OnPair.id()]
5555
}
5656

‎vortex-btrblocks/src/schemes/string/zstd_buffers.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Scheme for ZstdBuffersScheme {
3131
canonical.dtype().is_utf8()
3232
}
3333

34-
fn required_serialized_ids(&self) -> Vec<ArrayId> {
34+
fn produced_encodings(&self) -> Vec<ArrayId> {
3535
vec![vortex_zstd::ZstdBuffers.id()]
3636
}
3737

‎vortex-compressor/src/compressor/mod.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl CascadingCompressor {
101101

102102
/// Selects the newest eligible version of each scheme, intersecting with any earlier call.
103103
///
104-
/// A version is eligible only when all of its [`Scheme::required_serialized_ids`] are allowed.
104+
/// A version is eligible only when all of its [`Scheme::produced_encodings`] are allowed.
105105
/// Otherwise its predecessors are tried in order; the scheme is removed if none is eligible.
106106
/// Selection preserves registration order and happens before any compression or estimation.
107107
pub fn with_allowed_serialized_ids(mut self, allowed: HashSet<ArrayId>) -> Self {
@@ -154,6 +154,7 @@ impl CascadingCompressor {
154154
self.scheme_aliases.contains_key(&scheme)
155155
}
156156

157+
/// Resolves a registered version to the selected version, leaving unknown IDs unchanged.
157158
fn resolve_scheme_id(&self, scheme: SchemeId) -> SchemeId {
158159
self.scheme_aliases.get(&scheme).copied().unwrap_or(scheme)
159160
}

0 commit comments

Comments
 (0)