Jackie-Jiang opened a new pull request, #19747:
URL: https://github.com/apache/pinot/pull/19747

   Commons Lang 3.21.0 removes trailing empty fields from 
`StringUtils.splitByWholeSeparator`, causing 
`StringFunctionsTest.testSplitPartRandomized` to fail because Pinot's optimized 
`splitPart` implementations still retain them. This PR includes the dependency 
upgrade from #19718 and updates both `splitPart` overloads to discard trailing 
empty fields, consistently with leading and consecutive empty fields and with 
`split`/`stringToArray`.
   
   This changes results for inputs ending in a delimiter:
   
   - `split('a,b,', ',')` returns `['a', 'b']` instead of `['a', 'b', '']`.
   - `splitPart('a,b,', ',', -1)` returns `'b'` instead of `''`.
   - `splitPart('a,b,', ',', 2)` returns the existing out-of-range sentinel 
`'null'` instead of `''`.
   - Delimiter-only input produces no fields.
   
   When a split limit is reached, the final field still contains the unsplit 
remainder, including trailing delimiters: `split('a,b,', ',', 2)` returns 
`['a', 'b,']`.
   
   Tests cover single- and multi-character delimiters, negative indexes, 
delimiter-only input, split limits, and partial delimiter suffixes. The 
randomized comparison now uses a fixed seed and exercises both overloads 
against Commons Lang 3.21.0.
   
   Validation:
   
   - `./mvnw -pl pinot-common -am -Dtest=StringFunctionsTest 
-Dsurefire.failIfNoSpecifiedTests=false -Dmaven.compiler.showDeprecation=true 
-Dmaven.compiler.showWarnings=true test` — 200 tests passed; no compiler 
warnings on added lines.
   - `spotless:apply`, `license:format`, `checkstyle:check`, and 
`license:check` passed for `pinot-common` and the root POM.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to