manner commented on code in PR #29154:
URL: https://github.com/apache/flink/pull/29154#discussion_r3988492687


##########
docs/data/sql_functions.yml:
##########
@@ -227,7 +227,13 @@ arithmetic:
     description: Returns a pseudorandom integer value in the range [0, INT2) 
with an initial seed INT1. Two RAND_INTEGER functions will return identical 
sequences of numbers if they have the same initial seed and bound.
   - sql: UUID()
     table: uuid()
-    description: Returns an UUID (Universally Unique Identifier) string (e.g., 
"3d3c68f7-f608-473f-b60c-b0c44ad4cc4e") according to RFC 4122 type 4 (pseudo 
randomly generated) UUID. The UUID is generated using a cryptographically 
strong pseudo random number generator.
+    description: Returns an UUID (Universally Unique Identifier) string (e.g., 
"3d3c68f7-f608-473f-b60c-b0c44ad4cc4e") according to RFC 9562 version 4 (pseudo 
randomly generated) UUID. The UUID is generated using a cryptographically 
strong pseudo random number generator.
+  - sql: UUID_V4()
+    table: uuidV4()
+    description: Returns a random RFC 9562 version 4 UUID value. The UUID is 
generated using a cryptographically strong pseudo random number generator.
+  - sql: UUID_V7()

Review Comment:
   Good question, but I'd probably keep them separate. The thing is that not 
all versions fit a single function: v4 and v7 take no input, but v3/v5 are 
name-based and need a namespace + name. v1/v6 could be without argument, but 
they're largely superseded by v7. And v8 is intentionally custom, so there's no 
standard built-in we could generate.
   
   It also lines up with what others do, e.g. 
[Postgres](https://www.postgresql.org/docs/current/functions-uuid.html) has 
uuidv4()/uuidv7() as separate functions. If there's ever demand for the 
name-based ones, v3/v5 could be added later as their own functions taking a 
namespace + name.



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

Reply via email to