xiangfu0 opened a new pull request, #20338: URL: https://github.com/apache/pinot/pull/20338
## What changed A filter such as `BITAND(flags, 33) = 0` goes through the scalar function wrapper today. For a LONG column, the wrapper boxes the input values and invokes the function once per candidate row. This change evaluates the built-in integral `bitAnd` overloads on primitive Pinot value blocks. The factory resolves the scalar overload first, then selects the block implementation for single-value INT and LONG inputs. Mixed INT/LONG arguments keep the resolved return type, and argument null bitmaps propagate through the existing transform machinery. The optimization applies to both filters and projections with unchanged SQL and segment layouts. ## Verification The regression test covers INT and LONG dispatch, a literal mask on either side, and nullable mixed-width columns. It checks results, result types, and the null bitmap. ```shell ./mvnw -pl pinot-core -am -Dtest=ScalarTransformFunctionWrapperTest -Dsurefire.failIfNoSpecifiedTests=false test ``` All 116 tests passed. Scoped Spotless, Checkstyle and license checks passed. -- 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]
