xiangfu0 opened a new pull request, #19091:
URL: https://github.com/apache/pinot/pull/19091

   ## What
   UUID scalar functions and their multi-stage UDF wrappers.
   
   ## Changes
   - `IS_UUID` / `TO_UUID` — polymorphic over `STRING` and `BYTES`, sharing 
dispatch via `AbstractStringOrBytesUuidFunction`
   - `UUID_TO_BYTES`, `BYTES_TO_UUID`, `UUID_TO_STRING`, `UUID_VERSION`, 
`UUID_TIMESTAMP`
   - `UUID_V4` / `UUID_V7` generators, marked `isDeterministic = false` so the 
broker's `CompileTimeFunctionsInvoker` does not fold a single value across 
every row
   - Matching `Udf` wrappers so the functions are registered with the 
multi-stage UDF registry
   
   ## Why this is a standalone PR
   Split out of #18875 ([UUID 7/8]) so the scalar function surface can be 
reviewed and merged in parallel with the UUID partitioning work.
   
   This branch is based directly on `master` and depends only on pieces that 
are **already merged**:
   - `UuidUtils` — #18869 ([UUID 1/8])
   - `DataSchema.ColumnDataType.UUID` / `UUID_ARRAY` — #18871 ([UUID 3/8])
   - `SqlTypeName.UUID` — Calcite 1.42, the version master is already on
   
   It does **not** depend on the unmerged layers (#18872, #18873, #18874). The 
files-changed tab is exactly this change — no cumulative stack.
   
   #18875 keeps the remaining layer-7 scope: `UuidPartitionFunction`, the 
`PartitionerFactory` / `TableConfigPartitioner` wiring, and `UUID_ARRAY` 
support in the array scalar functions.
   
   ## Testing
   - `UuidConversionFunctionsTest` — conversions, version/timestamp accessors, 
null handling
   - `StringFunctionsTest` — mixed-case UUID round-trip through `toUUIDBytes` / 
`fromUUIDBytes`
   - `IsUuidUdf` declares `STRING` and `BYTES` example signatures so the UDF 
test framework exercises `IS_UUID` rather than skipping it
   
   ### Known gap
   The other eight UDF wrappers still return an empty `getExamples()`. 
`PinotFunctionEnvGenerator.updateSchema` has no `UUID` case and throws 
`Unsupported data type`, so a UDF with a UUID-typed parameter or result cannot 
declare examples yet. Teaching the UDF test harness the UUID type is worth its 
own PR; noting it here so the empty maps are not mistaken for an oversight.
   
   Full feature description and design contract: #18140.
   


-- 
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