dwsmith1983 opened a new pull request, #7600: URL: https://github.com/apache/datafusion-comet/pull/7600
## Which issue does this PR close? Refs #7573. This is the first of three PRs: 1. This PR: the native kernel. 2. A core hook that lets a contrib register an expression serde. Not opened yet; it waits on the design question in #7573. 3. #7597: the Delta serde and expression suite. It uses both and closes #7573. 1 and 2 can merge in either order; #7597 goes last. ## Rationale for this change Delta's `InterleaveBits` builds the Z-order key for liquid clustering and `OPTIMIZE ZORDER BY`. Comet has no native version, so the projection falls back to Spark. This adds the kernel on its own, so it can be reviewed without the Delta wiring. ## What changes are included in this PR? - `delta_interleave_bits`, a scalar function for one or two `Int32` inputs. Bits are taken from the most significant down, alternating between inputs with the first input in the higher position. A null input counts as zero, and the result is four bytes per input and never null, as in Delta. - Registered by name in `all_scalar_functions()`. Nothing calls it from Spark yet. ## How are these changes tested? Unit tests compare the output with values produced by Delta's own `InterleaveBits` on both its default and fast code paths: signed extrema, nulls, alternating bit patterns and generated pairs. Other tests cover scalar and array arguments in each position, all-scalar calls, and rejection of wrong argument counts or types. -- 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]
