rich7420 commented on code in PR #5798:
URL: https://github.com/apache/datafusion-comet/pull/5798#discussion_r3976807682


##########
spark/src/test/resources/sql-tests/expressions/array/element_at_ansi.sql:
##########
@@ -31,46 +31,47 @@ CREATE TABLE ansi_element_at_oob(arr array<int>) USING 
parquet
 statement
 INSERT INTO ansi_element_at_oob VALUES (array(1, 2, 3))
 
+-- Valid positive and negative boundary indices must run natively and match 
Spark.
+query
+SELECT element_at(arr, 1), element_at(arr, 3), element_at(arr, -1), 
element_at(arr, -3)
+FROM ansi_element_at_oob
+
 -- ============================================================================
 -- element_at index out of bounds (positive index)
--- Spark throws: [INVALID_ARRAY_INDEX_IN_ELEMENT_AT] ...
--- Comet throws: Index out of bounds for array
--- See https://github.com/apache/datafusion-comet/issues/3375
+-- Spark and Comet throw INVALID_ARRAY_INDEX_IN_ELEMENT_AT in ANSI mode.
 -- ============================================================================
 
 -- index beyond array length should throw (1-based indexing)
-query ignore(https://github.com/apache/datafusion-comet/issues/3375)
+query expect_error(INVALID_ARRAY_INDEX_IN_ELEMENT_AT)
 SELECT element_at(arr, 10) FROM ansi_element_at_oob
 
 -- literal array with out of bounds access
-query ignore(https://github.com/apache/datafusion-comet/issues/3375)
+query expect_error(INVALID_ARRAY_INDEX_IN_ELEMENT_AT)
 SELECT element_at(array(1, 2, 3), 5)

Review Comment:
   Ok, I'll add to them



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