davidradl commented on code in PR #26704:
URL: https://github.com/apache/flink/pull/26704#discussion_r2161640992


##########
docs/data/sql_functions.yml:
##########
@@ -1178,6 +1178,24 @@ valueconstruction:
       ```sql
       f(columns => DESCRIPTOR(`col1`, `col2`), on_time => DESCRIPTOR(`ts`))
       ```
+  - sql: OBJECT_OF(className, [key, value [, key, value , ...]])
+    table: objectOf(STRING, Object...)
+    description: |
+      Creates a structured object from a list of key-value pairs.
+
+      The function creates an instance of a structured type identified by the 
given class name.
+      The structured type is created by providing alternating key-value pairs 
where keys must be
+      string literals and values can be arbitrary expressions.
+
+      Users are responsible for providing a valid fully qualified class name 
that exists
+      in the classpath. The class name should follow Java naming conventions 
(e.g., 'com.example.User').
+      If an invalid or non-existent class name is provided, the function will 
fall back to using

Review Comment:
   Why do we fallback to row- instead of erroring?
   If we fallback to row.class, what is the implication for the user? i.e. what 
have they lost? 
   When we refer to a classname, does this have to be a java bean with matching 
properties - if so we should document this? If so, can we not introspect the 
bean for the field names? I see for Row.class we would need the list of field 
names to be supplied.



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