You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Jiyoung Yoo (Jira)" <ji...@apache.org> on 2026/10/08 23:18:00 UTC
[jira] [Created] (IMPALA-15532) Incorrect result in instr() function when start position overflows 32-bit integer
Jiyoung Yoo created IMPALA-15532:
------------------------------------
Summary: Incorrect result in instr() function when start position overflows 32-bit integer
Key: IMPALA-15532
URL: https://issues.apache.org/jira/browse/IMPALA-15532
Project: IMPALA
Issue Type: Bug
Reporter: Jiyoung Yoo
In instr() string function, passing a 64-bit integer as the 'position' argument can lead to integer overflow when implicitly converted or cast to int32_t or uint32_t.
As a result, when the start position is outside the string boundary, the function returns an incorrect non-zero index instead of returning '0' (not found).
Examples:
instr('corporate floor', 'or', 4294967297) -> returns 2 (expected 0)
instr('corporate floor', 'or', -4294967294) -> returns 14 (expected 0)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org