From c02befe84689ff338f4580279ff83edd9e96eacb Mon Sep 17 00:00:00 2001 From: Yongting You <2010youy01@gmail.com> Date: Thu, 16 Apr 2026 11:08:36 +0800 Subject: [PATCH] fix compilation caused by merge race --- datafusion/physical-optimizer/src/window_topn.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/datafusion/physical-optimizer/src/window_topn.rs b/datafusion/physical-optimizer/src/window_topn.rs index e138a69652e7..40dbddfbdf9f 100644 --- a/datafusion/physical-optimizer/src/window_topn.rs +++ b/datafusion/physical-optimizer/src/window_topn.rs @@ -238,15 +238,15 @@ impl PhysicalOptimizerRule for WindowTopN { fn extract_window_limit( predicate: &Arc, ) -> Option<(usize, usize)> { - let binary = predicate.as_any().downcast_ref::()?; + let binary = predicate.downcast_ref::()?; let op = binary.op(); let left = binary.left(); let right = binary.right(); // Try Column op Literal if let (Some(col), Some(lit_val)) = ( - left.as_any().downcast_ref::(), - right.as_any().downcast_ref::(), + left.downcast_ref::(), + right.downcast_ref::(), ) { let n = scalar_to_usize(lit_val.value())?; return match *op { @@ -258,8 +258,8 @@ fn extract_window_limit( // Try Literal op Column (flipped) if let (Some(lit_val), Some(col)) = ( - left.as_any().downcast_ref::(), - right.as_any().downcast_ref::(), + left.downcast_ref::(), + right.downcast_ref::(), ) { let n = scalar_to_usize(lit_val.value())?; return match *op {