Jefffrey commented on code in PR #19297:
URL: https://github.com/apache/datafusion/pull/19297#discussion_r2617209842


##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -6599,8 +6599,28 @@ select count(*) from arrays where 'X'=any(column3);
 ----
 0
 
-query error DataFusion error: Error during planning: Unsupported AnyOp: '>', 
only '=' is supported
-select count(*) from arrays where 'X'>any(column3);
+query error DataFusion error: Error during planning: Unsupported AnyOp: '<>', 
only '=', '>', '<', '>=', '<=' are supported
+select count(*) from arrays where 'X'<>any(column3);
+
+query I
+select count(*) from arrays where 10.0<any(column2);
+----
+3
+
+query I
+select count(*) from arrays where 10.0<=any(column2);
+----
+3
+
+query I
+select count(*) from arrays where 10.0>any(column2);
+----
+3
+
+query I
+select count(*) from arrays where 10.0>=any(column2);
+----
+3

Review Comment:
   I feel these tests aren't very clear as to what is happening:
   
   - They all have the same apparent result
   - The choice of `10.0` as the needle doesn't reflect the behaviour of `any` 
here since from what I can tell, `column2` arrays all either have elements less 
than 10 or greater than 10, but none that span both of those ranges
   
   Perhaps these would be clearer if we chose a needle that for some arrays is 
greater & less than elements in a single array row, and maybe have the data 
closer to here (rather than using `arrays`) so the test is easier to read?
   
   Edit: also prefer not using `count(*)` and just return the results as is, so 
it's much clearer what the output is instead of an opaque count



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