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