Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2919#discussion_r91111043
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/scala/table/expressionDsl.scala
---
@@ -454,6 +455,29 @@ trait ImplicitExpressionOperations {
* into a flat representation where every subtype is a separate field.
*/
def flatten() = Flattening(expr)
+
+ /**
+ * Accesses the element of an array based on an index (starting at 1).
+ *
+ * @param index position of the element (starting at 1)
+ * @return value of the element
+ */
+ def at(index: Expression) = ArrayElementAt(expr, index)
+
+ /**
+ * Returns the number of elements of an array.
+ *
+ * @return number of element
+ */
+ def cardinality() = ArrayCardinality(expr)
+
+ /**
+ * Returns the sole element of an array. Returns null if the collection
is empty.
+ * Throws an exception if the array has more than one element.
+ *
+ * @return first element of the array
--- End diff --
`the only element of an array with a single entry`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---