From 6d1276a2bcf7965165d1d76b6b5e7cecb624c679 Mon Sep 17 00:00:00 2001 From: huaxingao Date: Mon, 19 Aug 2024 14:50:26 -0700 Subject: [PATCH] remove unnecessary cast --- native/core/src/execution/datafusion/planner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/core/src/execution/datafusion/planner.rs b/native/core/src/execution/datafusion/planner.rs index 0cc426e9c..c2468b9be 100644 --- a/native/core/src/execution/datafusion/planner.rs +++ b/native/core/src/execution/datafusion/planner.rs @@ -1608,7 +1608,7 @@ impl PhysicalPlanner { } }, LowerFrameBoundStruct::Preceding(offset) => { - let offset_value = offset.offset.abs() as i64; + let offset_value = offset.offset.abs(); match units { WindowFrameUnits::Rows => WindowFrameBound::Preceding(ScalarValue::UInt64( Some(offset_value as u64), @@ -1647,7 +1647,7 @@ impl PhysicalPlanner { WindowFrameBound::Following(ScalarValue::UInt64(Some(offset.offset as u64))) } WindowFrameUnits::Range | WindowFrameUnits::Groups => { - WindowFrameBound::Following(ScalarValue::Int64(Some(offset.offset as i64))) + WindowFrameBound::Following(ScalarValue::Int64(Some(offset.offset))) } }, UpperFrameBoundStruct::CurrentRow(_) => WindowFrameBound::CurrentRow,