You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/02/03 17:27:14 UTC

[I] ANSI mode array access error messages don't match Spark format [datafusion-comet]

andygrove opened a new issue, #3375:
URL: https://github.com/apache/datafusion-comet/issues/3375

   ### Describe the bug
   
   When ANSI mode is enabled (spark.sql.ansi.enabled=true), Comet throws exceptions for out-of-bounds array access, but the error message format differs from Spark's format.
   
   Spark Error Messages                                                                                                                                                                                   
                                                                                                                                                                                                      
   For array[index] (GetArrayItem):                                                                                                                                                                       
   [INVALID_ARRAY_INDEX] The index X is out of bounds. The array has Y elements. Use the SQL function `get()` to tolerate accessing element at invalid index and return NULL instead.                     
                                                                                                                                                                                                      
   For element_at(array, index) with out-of-bounds:                                                                                                                                                       
   [INVALID_ARRAY_INDEX_IN_ELEMENT_AT] The index X is out of bounds. The array has Y elements. Use `try_element_at` to tolerate accessing element at invalid index and return NULL instead.               
                                                                                                                                                                                                      
   For element_at(array, 0):                                                                                                                                                                              
   [INVALID_INDEX_OF_ZERO] The index 0 is invalid. An index shall be either < 0 or > 0 (the first element has index 1).                                                                                   
                                                                                                                                                                                                      
   Comet Error Messages                                                                                                                                                                                   
                                                                                                                                                                                                      
   Comet currently throws:                                                                                                                                                                                
   org.apache.comet.CometNativeException: Index out of bounds for array           
   
   ### Steps to reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] ANSI mode array access error messages don't match Spark format [datafusion-comet]

Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra closed issue #3375: ANSI mode array access error messages don't match Spark format
URL: https://github.com/apache/datafusion-comet/issues/3375


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org