From 1659a4cc9598aa314fb3d036d8a5b5c0e5f81c39 Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Thu, 25 Apr 2024 08:17:20 -0600 Subject: [PATCH] bug fix --- core/src/execution/datafusion/expressions/cast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/execution/datafusion/expressions/cast.rs b/core/src/execution/datafusion/expressions/cast.rs index 7786f1d29..2ad5a7eb7 100644 --- a/core/src/execution/datafusion/expressions/cast.rs +++ b/core/src/execution/datafusion/expressions/cast.rs @@ -440,8 +440,8 @@ fn do_cast_string_to_int( } // skip + or - - let negative = chars[0] == '-'; - if negative || chars[0] == '+' { + let negative = chars[i] == '-'; + if negative || chars[i] == '+' { i += 1; if i == end { accumulator.reset();