test(rust): fix geo ST_DWithin test compilation and RTE expectation

This commit is contained in:
Xuanwo
2026-10-27 09:16:14 +08:00
parent fee7fa791d
commit a001db6b66
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -3229,8 +3229,9 @@ mod tests {
),
]));
let vectors = FixedSizeListArray::from_iter_primitive::<Float32Type, _, _>(
rows.iter()
.map(|(_, _, _, vector)| Some(vector.iter().copied().map(Some).collect())),
rows.iter().map(|(_, _, _, vector)| {
Some(vector.iter().copied().map(Some).collect::<Vec<_>>())
}),
2,
);
RecordBatch::try_new(
@@ -3304,7 +3305,7 @@ mod tests {
let table = make_geo_query_table(&tmp_dir).await;
let batches = table
.query()
.nearest_to([0.0, 0.0])
.nearest_to(&[0.0, 0.0])
.unwrap()
.only_if(ST_DWITHIN_FILTER)
.limit(2)
@@ -3391,11 +3392,11 @@ mod tests {
let plain = concat_batches(&plain[0].schema(), &plain).unwrap();
let mut plain_ids = plain["id"].as_primitive::<Int32Type>().values().to_vec();
plain_ids.sort_unstable();
assert_eq!(plain_ids, vec![1, 4]);
assert_eq!(plain_ids, vec![1, 2, 4]);
let vector = table
.query()
.nearest_to([0.0, 0.0])
.nearest_to(&[0.0, 0.0])
.unwrap()
.only_if(ST_DWITHIN_FILTER)
.limit(2)
+1 -1
View File
@@ -5703,7 +5703,7 @@ mod tests {
let batches = table
.query()
.nearest_to([0.0, 0.0])
.nearest_to(&[0.0, 0.0])
.unwrap()
.only_if(FILTER)
.limit(2)