sunchao commented on code in PR #26067:
URL: https://github.com/apache/datafusion/pull/26067#discussion_r4365160693


##########
datafusion/sqllogictest/test_files/window.slt:
##########
@@ -7207,23 +7206,29 @@ select count(*) over (order by l) from (values ([1]), 
([2])) t(l)
 1
 2
 
-# but a list whose elements are nested (struct, list) plans and then fails at
-# execution: the peer comparison in the RANGE frame goes through
-# `ScalarValue::partial_cmp`, which cannot compare nested list elements, while
-# the sort that produced the input uses `make_comparator` and can. Documented
-# here so the fix to the scalar comparison can flip these expectations.
-query error DataFusion error: Internal error: Uncomparable values: 
List\(\[\{c0: 1\}\]\), List\(\[\{c0: 1\}\]\)
+# NULL elements must form the same peers as Arrow's list sort order.
+query I
+select count(*) over (order by l nulls first) from (values ([NULL::int]), 
([1]), ([NULL::int])) t(l)
+----
+2
+2
+3
+
+# Lists containing structs or lists also form RANGE peer groups.
+query I
 select count(*) over (order by l) from (values ([struct(1)]), ([struct(2)])) 
t(l)
+----
+1
+2
 
-query error DataFusion error: Internal error: Uncomparable values: 
List\(\[\[1\]\]\), List\(\[\[1\]\]\)
+query I
 select count(*) over (order by l) from (values ([[1]]), ([[2]])) t(l)

Review Comment:
   Updated in 
[`39358f523`](https://github.com/apache/datafusion/pull/26067/commits/39358f523fbc7f48a02c55606c3c66fc08a23990).
   
   
[nested_range_peers](https://github.com/apache/datafusion/blob/39358f523fbc7f48a02c55606c3c66fc08a23990/datafusion/sqllogictest/test_files/window.slt#L7223-L7245)



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

Reply via email to