Skip to content

Commit dff2c50

Browse files
committed
wip datetimeparts fixes
Signed-off-by: Joe Isaacs <[email protected]>
1 parent db44ca6 commit dff2c50

File tree

1 file changed

+3
-6
lines changed
  • encodings/datetime-parts/src/compute

1 file changed

+3
-6
lines changed

encodings/datetime-parts/src/compute/rules.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4+
use vortex_array::Array;
45
use vortex_array::ArrayRef;
56
use vortex_array::IntoArray;
67
use vortex_array::arrays::ConstantArray;
@@ -38,19 +39,15 @@ impl ArrayParentReduceRule<DateTimePartsVTable> for DTPFilterPushDownRule {
3839
parent: &FilterArray,
3940
child_idx: usize,
4041
) -> VortexResult<Option<ArrayRef>> {
41-
if child_idx != 0 {
42-
return Ok(None);
43-
}
42+
debug_assert_eq!(child_idx, 0);
4443

4544
if !child.seconds().is::<ConstantVTable>() || !child.subseconds().is::<ConstantVTable>() {
4645
return Ok(None);
4746
}
4847

4948
DateTimePartsArray::try_new(
5049
child.dtype().clone(),
51-
FilterArray::new(child.days().clone(), parent.filter_mask().clone())
52-
.into_array()
53-
.optimize()?,
50+
child.days().clone().filter(parent.filter_mask().clone())?,
5451
ConstantArray::new(
5552
child.seconds().as_constant().vortex_expect("constant"),
5653
parent.filter_mask().true_count(),

0 commit comments

Comments
 (0)