Jackie-Jiang opened a new pull request, #18927: URL: https://github.com/apache/pinot/pull/18927
## Summary Establishes a consistent internal/external representation for the `UUID` type across `pinot-spi`. ### `PinotDataType` - `java.util.UUID` is now the external form and `byte[]` the internal form. `UUID.convert` / `UUID_ARRAY.convert` return `UUID` / `UUID[]`, while `toInternal` returns `byte[]` / `byte[][]`. - `UUID.convert` delegates to `sourceType.toUUID(...)`, and every single-value type now defines `toUUID`. Unsupported conversions (e.g. `INT -> UUID`) throw a descriptive `Cannot convert value from INT to UUID` rather than the confusing `There is no single-value type ...` that leaked from the generic fallback. This mirrors how each type already overrides `toBytes` / `toTimestamp`. - JSON→UUID parsing moves into `JSON.toUUID`. The now-unused `toUuidBytesArray` is removed. ### `FieldSpec.DataType` - `UUID` values are represented uniformly as `byte[]`, matching the `BYTES` stored type. `equals` / `hashCode` / `compare` / `toString` drop the `toBytesValue` indirection and operate on `byte[]` directly. - Adds enum-level Javadoc documenting the in-memory Java class each type's values are held as, and calls out that `convertInternal` returns the internal storage form (`ByteArray` for `BYTES` / `UUID`). ### `UuidUtils` - `toBytes(String)` accepts the dashless 32-char hex form in addition to the canonical string, so `byte[]` default null values (stringified as raw hex) round-trip back through `FieldSpec.getDefaultNullValue`. -- 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]
