coderfender commented on code in PR #21101:
URL: https://github.com/apache/datafusion/pull/21101#discussion_r2973008564
##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -1641,6 +1679,83 @@ NULL
query error DataFusion error: Error during planning: 'array_min' does not
support zero arguments
select array_min();
+# array_min over multiple rows (exercises the offsets-based iteration)
+query I
+select array_min(column1) from (values
+ (make_array(1, 5, 3)),
+ (make_array(10, 2, 8)),
+ (NULL),
+ (make_array(NULL, 7, NULL)),
+ (make_array(100))
+) as t(column1);
+----
+1
+2
+NULL
+7
+100
+
+# array_min with NaN values (NaN should not be returned as min)
+query R
+select array_min(make_array(1.0, 'NaN'::double, 3.0));
+----
+1
+
+query R
+select array_min(make_array('NaN'::double, 'NaN'::double));
+----
+NaN
+
+query R
+select array_min(make_array('NaN'::double, NULL));
+----
+NaN
+
+# array_min with Int32 (exercises a different primitive type than Int64)
+query I
+select array_min(arrow_cast(make_array(10, -5, 3), 'List(Int32)'));
Review Comment:
nice 👍🏽
--
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]