JinkunLiu commented on code in PR #27330:
URL: https://github.com/apache/flink/pull/27330#discussion_r2721286165


##########
docs/data/sql_functions.yml:
##########
@@ -1167,6 +1167,16 @@ variant:
       parser will keep the last occurrence of all fields with the same key, 
otherwise when 
       `allowDuplicateKeys` is false it will throw an error. The default value 
of 
       `allowDuplicateKeys` is false.
+  - sql: variant '[' INT ']'
+    table: VARIANT.at(INT)
+    description: |
+      If the VARIANT is an ARRAY value, returns a VARIANT whose value is the 
element at
+      the specified index. Otherwise, NULL is returned.
+  - sql: variant '[' STRING ']'

Review Comment:
   In Flink and other SQL-capable projects (e.g. `Calcite` or `Spark`), 
`.field` is typically meant for accessing fields of structured types whose 
field names are static and known during analysis/compile time (e.g. `ROW` in 
Flink).  Therefore I’m still evaluating whether we should implement this for 
`VARIANT`.



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