infoankitp commented on PR #38865:
URL: https://github.com/apache/spark/pull/38865#issuecomment-1342244189

   > One other issue @zhengruifeng @LuciferYang - this is one interesting edge 
case:
   > 
   > > > array_insert([1,2,3], 4, null)
   > > > [1,2,3,-1]
   > 
   > aka, a null entry for IntegerType 'item' input gets implicitly casted to a 
-1 value. This is presumably because scala doesn't support null-type integers. 
Is this intended behaviour going forward? I assume not, but I couldn't find an 
example in the existing codebase to handle this. Is it best to patch this with 
an Optional?
   
   I think we should return a null making these functions consistent with the 
older ones, or else make changes in the older functions as well. 


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