Skip to content

Commit e861c26

Browse files
committed
more fixes
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 326c875 commit e861c26

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

vortex-datafusion/src/v2/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,6 @@ fn estimate_to_df_precision(est: Option<&Precision<u64>>) -> DFPrecision<usize>
669669
Some(Precision::Inexact(v)) => {
670670
DFPrecision::Inexact(usize::try_from(*v).unwrap_or(usize::MAX))
671671
}
672-
None => DFPrecision::Absent,
672+
Some(Precision::Absent) | None => DFPrecision::Absent,
673673
}
674674
}

vortex-duckdb/src/datasource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ impl<T: DataSourceTableFunction> TableFunction for T {
608608
// Post-filter estimate is always a heuristic.
609609
Cardinality::Estimate(postfilter_cardinality(v, has_non_optional_filter))
610610
}
611-
None => Cardinality::Unknown,
611+
Some(Precision::Absent) | None => Cardinality::Unknown,
612612
}
613613
}
614614

vortex-ffi/src/scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn write_estimate<T: Into<u64>>(estimate: Option<Precision<T>>, out: &mut vx_est
204204
out.r#type = vx_estimate_type::VX_ESTIMATE_INEXACT;
205205
out.estimate = value.into();
206206
}
207-
None => {
207+
Some(Precision::Absent) | None => {
208208
out.r#type = vx_estimate_type::VX_ESTIMATE_UNKNOWN;
209209
}
210210
}

vortex-jni/src/data_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ pub extern "system" fn Java_dev_vortex_jni_NativeDataSource_rowCount(
204204
let (rows, cardinality) = match ds.inner.row_count() {
205205
Some(Precision::Exact(r)) => (r as jlong, 2),
206206
Some(Precision::Inexact(r)) => (r as jlong, 1),
207-
None => (0, 0),
207+
Some(Precision::Absent) | None => (0, 0),
208208
};
209209
out.set_region(env, 0, &[rows, cardinality])?;
210210
Ok(())

vortex-jni/src/scan.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pub extern "system" fn Java_dev_vortex_jni_NativeScan_partitionCount(
216216
let (rows, cardinality) = match scan.partition_count() {
217217
Some(Precision::Exact(v)) => (v as jlong, 2),
218218
Some(Precision::Inexact(v)) => (v as jlong, 1),
219-
None => (0, 0),
219+
Some(Precision::Absent) | None => (0, 0),
220220
};
221221
out.set_region(env, 0, &[rows, cardinality])?;
222222
Ok(())
@@ -286,7 +286,7 @@ pub extern "system" fn Java_dev_vortex_jni_NativePartition_rowCount(
286286
let (rows, cardinality) = match partition.row_count() {
287287
Some(Precision::Exact(v)) => (v as jlong, 2),
288288
Some(Precision::Inexact(v)) => (v as jlong, 1),
289-
None => (0, 0),
289+
Some(Precision::Absent) | None => (0, 0),
290290
};
291291
out.set_region(env, 0, &[rows, cardinality])?;
292292
Ok(())

0 commit comments

Comments
 (0)