Skip to content

Commit d05de64

Browse files
committed
block serialization for the existing aggregations
Signed-off-by: blaginin <github@blaginin.me>
1 parent 7a144d3 commit d05de64

File tree

8 files changed

+9
-85
lines changed

8 files changed

+9
-85
lines changed

vortex-array/src/aggregate_fn/fns/count/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ impl AggregateFnVTable for Count {
3131
}
3232

3333
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
34-
Ok(Some(vec![]))
35-
}
36-
37-
fn deserialize(
38-
&self,
39-
_metadata: &[u8],
40-
_session: &vortex_session::VortexSession,
41-
) -> VortexResult<Self::Options> {
42-
Ok(EmptyOptions)
34+
unimplemented!("Count is not yet serializable");
4335
}
4436

4537
fn return_dtype(&self, _options: &Self::Options, _input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/first/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,7 @@ impl AggregateFnVTable for First {
4444
}
4545

4646
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
47-
Ok(Some(vec![]))
48-
}
49-
50-
fn deserialize(
51-
&self,
52-
_metadata: &[u8],
53-
_session: &vortex_session::VortexSession,
54-
) -> VortexResult<Self::Options> {
55-
Ok(EmptyOptions)
47+
unimplemented!("First is not yet serializable");
5648
}
5749

5850
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/is_constant/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,7 @@ impl AggregateFnVTable for IsConstant {
260260
}
261261

262262
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
263-
Ok(Some(vec![]))
264-
}
265-
266-
fn deserialize(
267-
&self,
268-
_metadata: &[u8],
269-
_session: &vortex_session::VortexSession,
270-
) -> VortexResult<Self::Options> {
271-
Ok(EmptyOptions)
263+
unimplemented!("IsConstant is not yet serializable");
272264
}
273265

274266
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use std::fmt::Formatter;
1313

1414
use vortex_error::VortexExpect;
1515
use vortex_error::VortexResult;
16-
use vortex_error::vortex_bail;
1716

1817
use self::bool::check_bool_sorted;
1918
use self::decimal::check_decimal_sorted;
@@ -231,27 +230,8 @@ impl AggregateFnVTable for IsSorted {
231230
AggregateFnId::new_ref("vortex.is_sorted")
232231
}
233232

234-
fn serialize(&self, options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
235-
Ok(Some(vec![u8::from(options.strict)]))
236-
}
237-
238-
fn deserialize(
239-
&self,
240-
metadata: &[u8],
241-
_session: &vortex_session::VortexSession,
242-
) -> VortexResult<Self::Options> {
243-
let &[strict_byte] = metadata else {
244-
vortex_bail!(
245-
"IsSorted: expected 1 byte of metadata, got {}",
246-
metadata.len()
247-
);
248-
};
249-
let strict = match strict_byte {
250-
0 => false,
251-
1 => true,
252-
_ => vortex_bail!("IsSorted: expected 0 or 1 for strict, got {}", strict_byte),
253-
};
254-
Ok(IsSortedOptions { strict })
233+
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
234+
unimplemented!("IsSorted is not yet serializable");
255235
}
256236

257237
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/last/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,7 @@ impl AggregateFnVTable for Last {
4444
}
4545

4646
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
47-
Ok(Some(vec![]))
48-
}
49-
50-
fn deserialize(
51-
&self,
52-
_metadata: &[u8],
53-
_session: &vortex_session::VortexSession,
54-
) -> VortexResult<Self::Options> {
55-
Ok(EmptyOptions)
47+
unimplemented!("Last is not yet serializable");
5648
}
5749

5850
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/min_max/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,7 @@ impl AggregateFnVTable for MinMax {
177177
}
178178

179179
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
180-
Ok(Some(vec![]))
181-
}
182-
183-
fn deserialize(
184-
&self,
185-
_metadata: &[u8],
186-
_session: &vortex_session::VortexSession,
187-
) -> VortexResult<Self::Options> {
188-
Ok(EmptyOptions)
180+
unimplemented!("MinMax is not yet serializable");
189181
}
190182

191183
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/nan_count/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,7 @@ impl AggregateFnVTable for NanCount {
8585
}
8686

8787
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
88-
Ok(Some(vec![]))
89-
}
90-
91-
fn deserialize(
92-
&self,
93-
_metadata: &[u8],
94-
_session: &vortex_session::VortexSession,
95-
) -> VortexResult<Self::Options> {
96-
Ok(EmptyOptions)
88+
unimplemented!("NanCount is not yet serializable");
9789
}
9890

9991
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

vortex-array/src/aggregate_fn/fns/sum/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,7 @@ impl AggregateFnVTable for Sum {
7575
}
7676

7777
fn serialize(&self, _options: &Self::Options) -> VortexResult<Option<Vec<u8>>> {
78-
Ok(Some(vec![]))
79-
}
80-
81-
fn deserialize(
82-
&self,
83-
_metadata: &[u8],
84-
_session: &vortex_session::VortexSession,
85-
) -> VortexResult<Self::Options> {
86-
Ok(EmptyOptions)
78+
unimplemented!("Sum is not yet serializable");
8779
}
8880

8981
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {

0 commit comments

Comments
 (0)