Skip to content

Commit 416bf23

Browse files
committed
wip
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent a5632e2 commit 416bf23

21 files changed

Lines changed: 0 additions & 380 deletions

File tree

encodings/bytebool/src/array.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ use vortex_array::vtable::OperationsVTable;
2626
use vortex_array::vtable::VTable;
2727
use vortex_array::vtable::ValidityHelper;
2828
use vortex_array::vtable::ValidityVTableFromValidityHelper;
29-
use vortex_array::vtable::validity_nchildren;
30-
use vortex_array::vtable::validity_to_child;
3129
use vortex_buffer::BitBuffer;
3230
use vortex_buffer::ByteBuffer;
33-
use vortex_error::VortexExpect as _;
3431
use vortex_error::VortexResult;
3532
use vortex_error::vortex_bail;
3633
use vortex_error::vortex_ensure;
@@ -98,25 +95,6 @@ impl VTable for ByteBool {
9895
}
9996
}
10097

101-
fn nchildren(array: &ByteBoolArray) -> usize {
102-
validity_nchildren(array.validity())
103-
}
104-
105-
fn child(array: &ByteBoolArray, idx: usize) -> ArrayRef {
106-
match idx {
107-
0 => validity_to_child(array.validity(), array.len())
108-
.vortex_expect("ByteBoolArray validity child out of bounds"),
109-
_ => vortex_panic!("ByteBoolArray child index {idx} out of bounds"),
110-
}
111-
}
112-
113-
fn child_name(_array: &ByteBoolArray, idx: usize) -> String {
114-
match idx {
115-
0 => "validity".to_string(),
116-
_ => vortex_panic!("ByteBoolArray child_name index {idx} out of bounds"),
117-
}
118-
}
119-
12098
fn metadata(_array: &ByteBoolArray) -> VortexResult<Self::Metadata> {
12199
Ok(EmptyMetadata)
122100
}

encodings/datetime-parts/src/array.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -128,28 +128,6 @@ impl VTable for DateTimeParts {
128128
vortex_panic!("DateTimePartsArray buffer_name index {idx} out of bounds")
129129
}
130130

131-
fn nchildren(_array: &DateTimePartsArray) -> usize {
132-
3
133-
}
134-
135-
fn child(array: &DateTimePartsArray, idx: usize) -> ArrayRef {
136-
match idx {
137-
0 => array.days().clone(),
138-
1 => array.seconds().clone(),
139-
2 => array.subseconds().clone(),
140-
_ => vortex_panic!("DateTimePartsArray child index {idx} out of bounds"),
141-
}
142-
}
143-
144-
fn child_name(_array: &DateTimePartsArray, idx: usize) -> String {
145-
match idx {
146-
0 => "days".to_string(),
147-
1 => "seconds".to_string(),
148-
2 => "subseconds".to_string(),
149-
_ => vortex_panic!("DateTimePartsArray child_name index {idx} out of bounds"),
150-
}
151-
}
152-
153131
fn metadata(array: &DateTimePartsArray) -> VortexResult<Self::Metadata> {
154132
Ok(ProstMetadata(DateTimePartsMetadata {
155133
days_ptype: PType::try_from(array.days().dtype())? as i32,

encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,6 @@ impl VTable for DecimalByteParts {
110110
vortex_panic!("DecimalBytePartsArray buffer_name index {idx} out of bounds")
111111
}
112112

113-
fn nchildren(_array: &DecimalBytePartsArray) -> usize {
114-
1
115-
}
116-
117-
fn child(array: &DecimalBytePartsArray, idx: usize) -> ArrayRef {
118-
match idx {
119-
0 => array.msp().clone(),
120-
_ => vortex_panic!("DecimalBytePartsArray child index {idx} out of bounds"),
121-
}
122-
}
123-
124-
fn child_name(_array: &DecimalBytePartsArray, idx: usize) -> String {
125-
match idx {
126-
0 => "msp".to_string(),
127-
_ => vortex_panic!("DecimalBytePartsArray child_name index {idx} out of bounds"),
128-
}
129-
}
130-
131113
fn metadata(array: &DecimalBytePartsArray) -> VortexResult<Self::Metadata> {
132114
Ok(ProstMetadata(DecimalBytesPartsMetadata {
133115
zeroth_child_ptype: PType::try_from(array.msp().dtype())? as i32,

encodings/fastlanes/src/delta/vtable/mod.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,6 @@ impl VTable for Delta {
102102
None
103103
}
104104

105-
fn nchildren(_array: &DeltaArray) -> usize {
106-
2
107-
}
108-
109-
fn child(array: &DeltaArray, idx: usize) -> ArrayRef {
110-
match idx {
111-
0 => array.bases().clone(),
112-
1 => array.deltas().clone(),
113-
_ => vortex_panic!("DeltaArray child index {idx} out of bounds"),
114-
}
115-
}
116-
117-
fn child_name(_array: &DeltaArray, idx: usize) -> String {
118-
match idx {
119-
0 => "bases".to_string(),
120-
1 => "deltas".to_string(),
121-
_ => vortex_panic!("DeltaArray child name index {idx} out of bounds"),
122-
}
123-
}
124-
125105
fn reduce_parent(
126106
array: &Self::Array,
127107
parent: &ArrayRef,

encodings/fastlanes/src/for/vtable/mod.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,6 @@ impl VTable for FoR {
8888
None
8989
}
9090

91-
fn nchildren(_array: &FoRArray) -> usize {
92-
1
93-
}
94-
95-
fn child(array: &FoRArray, idx: usize) -> ArrayRef {
96-
match idx {
97-
0 => array.encoded().clone(),
98-
_ => vortex_panic!("FoRArray child index {idx} out of bounds"),
99-
}
100-
}
101-
102-
fn child_name(_array: &FoRArray, idx: usize) -> String {
103-
match idx {
104-
0 => "encoded".to_string(),
105-
_ => vortex_panic!("FoRArray child name index {idx} out of bounds"),
106-
}
107-
}
108-
10991
fn slots(array: &FoRArray) -> &[Option<ArrayRef>] {
11092
&array.slots
11193
}

encodings/fastlanes/src/rle/vtable/mod.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -110,28 +110,6 @@ impl VTable for RLE {
110110
None
111111
}
112112

113-
fn nchildren(_array: &RLEArray) -> usize {
114-
3
115-
}
116-
117-
fn child(array: &RLEArray, idx: usize) -> ArrayRef {
118-
match idx {
119-
0 => array.values().clone(),
120-
1 => array.indices().clone(),
121-
2 => array.values_idx_offsets().clone(),
122-
_ => vortex_panic!("RLEArray child index {idx} out of bounds"),
123-
}
124-
}
125-
126-
fn child_name(_array: &RLEArray, idx: usize) -> String {
127-
match idx {
128-
0 => "values".to_string(),
129-
1 => "indices".to_string(),
130-
2 => "values_idx_offsets".to_string(),
131-
_ => vortex_panic!("RLEArray child name index {idx} out of bounds"),
132-
}
133-
}
134-
135113
fn reduce_parent(
136114
array: &Self::Array,
137115
parent: &ArrayRef,

encodings/runend/src/array.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,6 @@ impl VTable for RunEnd {
107107
vortex_panic!("RunEndArray buffer_name index {idx} out of bounds")
108108
}
109109

110-
fn nchildren(_array: &RunEndArray) -> usize {
111-
2
112-
}
113-
114-
fn child(array: &RunEndArray, idx: usize) -> ArrayRef {
115-
match idx {
116-
0 => array.ends().clone(),
117-
1 => array.values().clone(),
118-
_ => vortex_panic!("RunEndArray child index {idx} out of bounds"),
119-
}
120-
}
121-
122-
fn child_name(_array: &RunEndArray, idx: usize) -> String {
123-
match idx {
124-
0 => "ends".to_string(),
125-
1 => "values".to_string(),
126-
_ => vortex_panic!("RunEndArray child_name index {idx} out of bounds"),
127-
}
128-
}
129-
130110
fn metadata(array: &RunEndArray) -> VortexResult<Self::Metadata> {
131111
Ok(ProstMetadata(RunEndMetadata {
132112
ends_ptype: PType::try_from(array.ends().dtype()).vortex_expect("Must be a valid PType")

encodings/sequence/src/array.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,6 @@ impl VTable for Sequence {
292292
vortex_panic!("SequenceArray buffer_name index {idx} out of bounds")
293293
}
294294

295-
fn nchildren(_array: &SequenceArray) -> usize {
296-
0
297-
}
298-
299-
fn child(_array: &SequenceArray, idx: usize) -> ArrayRef {
300-
vortex_panic!("SequenceArray child index {idx} out of bounds")
301-
}
302-
303-
fn child_name(_array: &SequenceArray, idx: usize) -> String {
304-
vortex_panic!("SequenceArray child_name index {idx} out of bounds")
305-
}
306-
307295
fn metadata(array: &SequenceArray) -> VortexResult<Self::Metadata> {
308296
Ok(SequenceMetadata {
309297
base: array.base(),

encodings/zigzag/src/array.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,6 @@ impl VTable for ZigZag {
8585
vortex_panic!("ZigZagArray buffer_name index {idx} out of bounds")
8686
}
8787

88-
fn nchildren(_array: &ZigZagArray) -> usize {
89-
1
90-
}
91-
92-
fn child(array: &ZigZagArray, idx: usize) -> ArrayRef {
93-
match idx {
94-
0 => array.encoded().clone(),
95-
_ => vortex_panic!("ZigZagArray child index {idx} out of bounds"),
96-
}
97-
}
98-
99-
fn child_name(_array: &ZigZagArray, idx: usize) -> String {
100-
match idx {
101-
0 => "encoded".to_string(),
102-
_ => vortex_panic!("ZigZagArray child_name index {idx} out of bounds"),
103-
}
104-
}
105-
10688
fn metadata(_array: &ZigZagArray) -> VortexResult<Self::Metadata> {
10789
Ok(EmptyMetadata)
10890
}

vortex-array/src/arrays/bool/vtable/mod.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ use crate::validity::Validity;
2525
use crate::vtable;
2626
use crate::vtable::VTable;
2727
use crate::vtable::ValidityVTableFromValidityHelper;
28-
use crate::vtable::validity_nchildren;
29-
use crate::vtable::validity_to_child;
3028
mod canonical;
3129
mod kernel;
3230
mod operations;
@@ -107,22 +105,6 @@ impl VTable for Bool {
107105
}
108106
}
109107

110-
fn nchildren(array: &BoolArray) -> usize {
111-
validity_nchildren(&array.validity)
112-
}
113-
114-
fn child(array: &BoolArray, idx: usize) -> ArrayRef {
115-
match idx {
116-
0 => validity_to_child(&array.validity, array.len())
117-
.vortex_expect("BoolArray child index out of bounds"),
118-
_ => vortex_panic!("BoolArray child index {idx} out of bounds"),
119-
}
120-
}
121-
122-
fn child_name(_array: &BoolArray, _idx: usize) -> String {
123-
"validity".to_string()
124-
}
125-
126108
fn metadata(array: &BoolArray) -> VortexResult<Self::Metadata> {
127109
assert!(array.offset < 8, "Offset must be <8, got {}", array.offset);
128110
Ok(ProstMetadata(BoolMetadata {

0 commit comments

Comments
 (0)