jonathanc-n commented on PR #13209: URL: https://github.com/apache/datafusion/pull/13209#issuecomment-2451202558
I kept two null checks in the array_resize function: one in the array_resize_inner function and one in the general_list_resize function. The first null check is needed for the original problem of handling cases like SELECT array_resize(arrow_cast(NULL, 'List(Int8)'), 1);. This scenario can't be checked by the second null check because the array has a length of zero. With a length of zero, it conflicts with the null builder, as the null counts as a length of one, which isn't the expected value when constructing the result. This is due to the null array and the data array needing to have matching lengths. -- 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]
