Commits


lriggs authored and GitHub committed aa5592edc27
GH-36182: [Gandiva][C++] Fix substring_index function when index is negative. (#36184) ### Rationale for this change substring_index("Abc.DE.fGh", '.', -2) returns "fGh" but it should return "DE.fGh" (ie starting from the second occurrence of the delimiter from the right). The proposed behavior matches the behavior of other databases. ### What changes are included in this PR? Fixed reverse index calculation and updated unit tests. ### Are these changes tested? Yes, unit tests and integration testing. ### Are there any user-facing changes? Function behavior change with substring_index function. * Closes: #36182 Authored-by: Projjal Chanda <iam@pchanda.com> Signed-off-by: Antoine Pitrou <antoine@python.org>