davidradl commented on code in PR #26777:
URL: https://github.com/apache/flink/pull/26777#discussion_r2200046306
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Expressions.java:
##########
@@ -624,6 +624,22 @@ 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))
Review Comment:
I am wondering what the constrains are for this
- what is the behaviour for duplicate keys - this should be documented, I
assume we take the first key value or error. We should add tests for this.
- are there any constraints on the key type - this should be documented and
tests added. How would it fail is the key type was not a valid one - for
example I would think a nested row is not appropriate for a key, but primitives
excluding boolean would seems reasonable.
--
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]