You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/core-concept/transform.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,13 +229,15 @@ You can use `CAST( <EXPR> AS <T> )` syntax to convert any valid expression `<EXP
229
229
230
230
## Struct Functions
231
231
232
-
Struct functions are used to access elements in ARRAY, MAPand ROW types using subscript syntax.
232
+
Struct functions are used to access elements in ARRAY, MAP, ROW, and VARIANT types using subscript syntax.
233
233
234
234
| Function | Janino Code | Description |
235
235
| -------- | ----------- | ----------- |
236
236
| array[index] | itemAccess(array, index) | Returns the element at position `index` in the array. Index is 1-based (SQL standard). Returns NULL if the index is out of bounds or if the array is NULL. |
237
237
| map[key] | itemAccess(map, key) | Returns the value associated with `key` in the map. Returns NULL if the key does not exist or if the map is NULL. |
238
238
| row[index] | itemAccess(row, index) | Returns the field at position `index` in the row. Index is 1-based. The index must be a constant (not a computed expression) since the return type must be statically determined. |
239
+
| variant[index] | itemAccess(variant, index) | Returns the element at position `index` in the variant (if it's an array). Index is 1-based (SQL standard). Returns NULL if the index is out of bounds or if the variant is not an array. |
240
+
| variant[key] | itemAccess(variant, key) | Returns the value associated with `key` in the variant (if it's an object). Returns NULL if the key does not exist or if the variant is not an object. |
Copy file name to clipboardExpand all lines: flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/metadata/TransformSqlOperatorTable.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -401,8 +401,8 @@ public SqlSyntax getSyntax() {
401
401
// ---------------------
402
402
// Struct Functions
403
403
// ---------------------
404
-
// Supports accessing elements of ARRAY[index], ROW[index]and MAP[key]
0 commit comments