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

   ## Description
   
   `GetArrayItem` (i.e., `arr[idx]` where `idx` is a column reference rather 
than a literal) returns results in incorrect order.
   
   ## How to reproduce
   
   ```sql
   CREATE TABLE test_get_array_item(arr array<int>, idx int) USING parquet;
   INSERT INTO test_get_array_item VALUES (array(10, 20, 30), 0), (array(10, 
20, 30), 1), (array(10, 20, 30), 2), (array(1), 0), (NULL, 0), (array(10, 20), 
NULL);
   SELECT arr[idx] FROM test_get_array_item;
   ```
   
   ### Expected results
   ```
   [10]
   [20]
   [30]
   [1]
   [null]
   [null]
   ```
   
   ### Actual results
   ```
   [10]
   [10]
   [1]
   [20]
   [30]
   [null]
   ```
   
   The results appear to be returned in an incorrect order.
   
   Found via `CometSqlFileTestSuite` running 
`expressions/array/get_array_item.sql`.


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