Skip to content

Commit 3eb497d

Browse files
committed
u
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 88a2a2d commit 3eb497d

File tree

1 file changed

+7
-8
lines changed
  • encodings/datetime-parts/src/compute

1 file changed

+7
-8
lines changed

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ impl ArrayParentReduceRule<DateTimePartsVTable> for DTPComparisonPushDownRule {
100100
child_idx: usize,
101101
) -> VortexResult<Option<ArrayRef>> {
102102
// Only handle comparison operations (Binary comparisons or Between)
103-
if !is_comparison_op(parent) {
103+
if !parent
104+
.scalar_fn()
105+
.as_opt::<Binary>()
106+
.is_some_and(|c| c.maybe_cmp_operator().is_some())
107+
&& !parent.scalar_fn().is::<Between>()
108+
{
104109
return Ok(None);
105110
}
106111

@@ -140,13 +145,7 @@ impl ArrayParentReduceRule<DateTimePartsVTable> for DTPComparisonPushDownRule {
140145
}
141146

142147
/// Check if the scalar function is a comparison operation we can push down.
143-
fn is_comparison_op(parent: &ScalarFnArray) -> bool {
144-
parent
145-
.scalar_fn()
146-
.as_opt::<Binary>()
147-
.is_some_and(|c| c.maybe_cmp_operator().is_some())
148-
|| parent.scalar_fn().is::<Between>()
149-
}
148+
fn is_comparison_op(parent: &ScalarFnArray) -> bool {}
150149

151150
/// Try to extract the days value from a constant timestamp.
152151
/// Returns None if the constant is not a timestamp or has non-zero seconds/subseconds.

0 commit comments

Comments
 (0)