krishvishal commented on PR #16203:
URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2937158972

   @comphead I've had to add the handler because the previous fix caused wrong 
behavior.
   
   For example the following query currently returns:
   
   ```sql
   > select [named_struct('a', 1, 'b', null)][1];
   
   +-----------------------------------------------------------------------+
   | make_array(named_struct(Utf8("a"),Int64(1),Utf8("b"),NULL))[Int64(1)] |
   +-----------------------------------------------------------------------+
   | {a: 1, b: NULL}                                                       |
   +-----------------------------------------------------------------------+
   1 row(s) fetched. 
   Elapsed 0.007 seconds.
   ```
   
   This is correct. But my previous fix (commit: 
d9a699ff7b787bf75da8415431fccf8cd676fa3d) returned `NULL`. So to fix the 
behavior while also handling out of bounds indexes, I've had to add this 
handler.


-- 
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-unsubscr...@datafusion.apache.org

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


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

Reply via email to