mayankshriv opened a new pull request, #18409:
URL: https://github.com/apache/pinot/pull/18409
## Summary
- Adds 23 new `@ScalarFunction` methods to close gaps with
ClickHouse/Trino/Presto, covering three categories:
- **Math** (8): `cbrt`, `exp2`, `exp10`, `log1p`, `sigmoid`, `pi`, `e`,
`bitCount` — simple delegations to `java.lang.Math` / JDK stdlib
- **IP address** (8): `isIPv4String`, `isIPv6String`, `ipv4ToLong`,
`longToIpv4`, `ipv6ToBytes`, `bytesToIpv6`, `ipv4ToIpv6`, `ipv4CIDRToRange` —
uses existing `inet.ipaddr` dependency
- **String** (7): `ascii`, `space`, `substringIndex`/`substring_index`,
`firstLine`, `startsWithCaseInsensitive`, `endsWithCaseInsensitive`,
`isValidASCII`
- No new dependencies — all implementations use libraries already on the
classpath
- All functions are stateless, thread-safe, and auto-registered via
`FunctionRegistry`
## Test plan
- [ ] 53 unit tests across `ArithmeticFunctionsTest` (new),
`IpAddressFunctionsTest`, `StringFunctionsTest` — edge cases include NaN,
Infinity, boundary values, round-trip conversions, invalid inputs
- [ ] 24 transform tests in `ScalarTransformFunctionWrapperTest` — verifies
each function works end-to-end through `ScalarTransformFunctionWrapper` with
segment data
- [ ] All 77 tests passing, zero compiler deprecation warnings in changed
files
- [ ] Spotless, checkstyle, and license checks pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]