snuyanzin commented on code in PR #22745:
URL: https://github.com/apache/flink/pull/22745#discussion_r1251041965


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Expressions.java:
##########
@@ -553,6 +553,23 @@ public static ApiExpression mapFromArrays(Object key, 
Object value) {
                 objectToExpression(value));
     }
 
+    /**
+     * Creates a map from an array of entries (row with two fields).
+     *
+     * <pre>{@code
+     * table.select(
+     *     mapFromEntries(
+     *         array(row(key1, 1), row(key2, 2), row(key3, 3))
+     *     ))
+     * }</pre>
+     *
+     * <p>Note If the number of fields in a row array is not 2 or the key of a 
row array is null, an
+     * error is returned.

Review Comment:
   >or the key of a row array is null, an
        * error is returned.
        
   I didn't get it, could you elaborate please?
   
   i have a query with null key
   ```sql
   SELECT map_from_entries(ARRAY[ROW(CAST(NULL AS INT), 'value')]);
   ```
   and it doesn't return error



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