uros-b commented on code in PR #58301:
URL: https://github.com/apache/spark/pull/58301#discussion_r4070953050
##########
sql/api/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -14870,6 +14870,53 @@ object functions {
*/
def is_variant_null(v: Column): Column = Column.fn("is_variant_null", v)
+ /**
+ * Returns the number of elements in a variant array. Returns NULL if the
input is SQL NULL, a
+ * variant null, or any non-array variant value.
+ *
+ * @param v
+ * a variant column. A column that evaluates to a variant.
+ * @group variant_funcs
+ * @since 5.0.0
+ * @return
+ * Returns a column that evaluates to an integer.
+ */
+ def variant_array_length(v: Column): Column =
Column.fn("variant_array_length", v)
+
+ /**
+ * Returns the number of elements in the variant array at `path`. Returns
NULL if the input is
+ * SQL NULL, the path does not exist, or the target is a variant null or any
non-array variant
+ * value.
+ *
+ * @param v
+ * a variant column. A column that evaluates to a variant.
+ * @param path
+ * a column containing a JSONPath string that identifies the array to
inspect.
+ * @group variant_funcs
+ * @since 5.0.0
Review Comment:
```suggestion
* @since 4.4.0
```
##########
sql/api/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -14870,6 +14870,53 @@ object functions {
*/
def is_variant_null(v: Column): Column = Column.fn("is_variant_null", v)
+ /**
+ * Returns the number of elements in a variant array. Returns NULL if the
input is SQL NULL, a
+ * variant null, or any non-array variant value.
+ *
+ * @param v
+ * a variant column. A column that evaluates to a variant.
+ * @group variant_funcs
+ * @since 5.0.0
+ * @return
+ * Returns a column that evaluates to an integer.
+ */
+ def variant_array_length(v: Column): Column =
Column.fn("variant_array_length", v)
+
+ /**
+ * Returns the number of elements in the variant array at `path`. Returns
NULL if the input is
+ * SQL NULL, the path does not exist, or the target is a variant null or any
non-array variant
+ * value.
+ *
+ * @param v
+ * a variant column. A column that evaluates to a variant.
+ * @param path
+ * a column containing a JSONPath string that identifies the array to
inspect.
+ * @group variant_funcs
+ * @since 5.0.0
+ * @return
+ * Returns a column that evaluates to an integer.
+ */
+ def variant_array_length(v: Column, path: Column): Column =
+ Column.fn("variant_array_length", v, path)
+
+ /**
+ * Returns the number of elements in the variant array at `path`. Returns
NULL if the input is
+ * SQL NULL, the path does not exist, or the target is a variant null or any
non-array variant
+ * value.
+ *
+ * @param v
+ * a variant column. A column that evaluates to a variant.
+ * @param path
+ * a JSONPath string that identifies the array to inspect.
+ * @group variant_funcs
+ * @since 5.0.0
Review Comment:
```suggestion
* @since 4.4.0
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]