From d2d7adff9e7010625c9de53549674f97c4e736a5 Mon Sep 17 00:00:00 2001 From: rajajisai Date: Fri, 1 Aug 2025 16:30:32 -0700 Subject: [PATCH] Including test for parsing large numeric strings as number when an operand is numerican when doing logical comparision --- testing/scalar-functions.test | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testing/scalar-functions.test b/testing/scalar-functions.test index 8ab2ce2b6..9ef2f74b3 100755 --- a/testing/scalar-functions.test +++ b/testing/scalar-functions.test @@ -930,6 +930,15 @@ do_execsql_test cast-in-where { select age from users where age = cast('45' as integer) limit 1; } {45} +#Parsing test for large numeric strings in logical operations with numeric operands +do_execsql_test parse-large-integral-numeric-string-as-number { + SELECT (104614899632619 || 45597) > CAST(0 AS NUMERIC); +} {1} + +do_execsql_test parse-large-integral-numeric-string-as-number { + SELECT (-104614899632619 || 45597) > CAST(0 AS NUMERIC); +} {0} + # TODO: sqlite seems not enable soundex() by default unless build it with SQLITE_SOUNDEX enabled. # do_execsql_test soundex-text { # select soundex('Pfister'), soundex('husobee'), soundex('Tymczak'), soundex('Ashcraft'), soundex('Robert'), soundex('Rupert'), soundex('Rubin'), soundex('Kant'), soundex('Knuth'), soundex('x'), soundex('');