Skip to content

Commit fd09114

Browse files
committed
test: migrate common-query APIs to DataFusion 54
Signed-off-by: discord9 <discord9@163.com>
1 parent f0e477e commit fd09114

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/common/query/src/request.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ mod tests {
389389
.decode_datafusion_expr(&TaskContext::default(), &schema, 1024)
390390
.unwrap();
391391

392-
let original = expr.as_any().downcast_ref::<Column>().unwrap();
393-
let decoded = decoded.as_any().downcast_ref::<Column>().unwrap();
392+
let original = expr.downcast_ref::<Column>().unwrap();
393+
let decoded = decoded.downcast_ref::<Column>().unwrap();
394394

395395
assert_eq!(decoded.name(), original.name());
396396
assert_eq!(decoded.index(), original.index());
@@ -455,7 +455,7 @@ mod tests {
455455
)) as Arc<dyn PhysicalExpr>;
456456
let lookup = Arc::new(HashTableLookupExpr::new(
457457
vec![Arc::clone(&device_id)],
458-
SeededRandomState::with_seeds(0, 0, 0, 0),
458+
SeededRandomState::with_seed(0),
459459
Arc::new(Map::HashMap(Box::new(JoinHashMapU32::with_capacity(0)))),
460460
"hash_lookup".to_string(),
461461
)) as Arc<dyn PhysicalExpr>;
@@ -537,10 +537,10 @@ mod tests {
537537
));
538538
}
539539

540-
fn contains_expr<T: 'static>(expr: &Arc<dyn PhysicalExpr>) -> bool {
540+
fn contains_expr<T: PhysicalExpr>(expr: &Arc<dyn PhysicalExpr>) -> bool {
541541
let mut found = false;
542542
expr.apply(|node| {
543-
if node.as_any().is::<T>() {
543+
if node.is::<T>() {
544544
found = true;
545545
Ok(TreeNodeRecursion::Stop)
546546
} else {

src/common/query/src/request/initial_remote_dyn_filter_reg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ mod tests {
371371
let decoded = reg
372372
.decode_children(&TaskContext::default(), &schema, 1024)
373373
.unwrap();
374-
let decoded = decoded[0].as_any().downcast_ref::<Column>().unwrap();
374+
let decoded = decoded[0].downcast_ref::<Column>().unwrap();
375375

376376
assert_eq!(reg.filter_id, "filter-1");
377377
assert_eq!(decoded.name(), "host");

0 commit comments

Comments
 (0)