Re: [I] Proper NULL handling in array functions [datafusion]

2025-03-05 Thread via GitHub
jayzhan211 closed issue #14451: Proper NULL handling in array functions URL: https://github.com/apache/datafusion/issues/14451 -- 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. T

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-17 Thread via GitHub
alan910127 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2664259352 > I don't think it's _that_ important to match DuckDB errors 100%, but I might be the wrong person to ask. Yeah, I agree. But in this case, I feel like their implementa

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-17 Thread via GitHub
jkosh44 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2663496088 > @jkosh44 do you have any desired behavior when an argument of incorrect type is passed to the functions? I think an error should be returned. I don't have a strong opin

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-17 Thread via GitHub
alan910127 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2663388998 > Also FWIW, it seems like the issue with some of these functions is with passing in any incorrect type, not just NULL. For example, @jkosh44 do you have any desired b

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-07 Thread via GitHub
alan910127 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2643568090 @jkosh44 Thanks for all this information! I’ll take a look at the PR later and likely review it. If I have any thoughts or suggestions, I’ll leave comments there. -- This

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-06 Thread via GitHub
jkosh44 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-264182 > @alan910127 I have a very rough proposal, that might help you with this issue OK I put this together here: https://github.com/apache/datafusion/pull/14532, if you're in

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-06 Thread via GitHub
jkosh44 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2640661851 Also FWIW, it seems like the issue with some of these functions is with passing in any incorrect type, not just NULL. For example, ``` > select array_resize([1,2,3,4],

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-06 Thread via GitHub
jkosh44 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2640446112 @alan910127 I have a very rough proposal, that might help you with this issue. When working with `ArrayFunctionSignature` I found it very difficult to express my desired signatu

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-06 Thread via GitHub
jkosh44 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2640335154 > Hello [@jkosh44](https://github.com/jkosh44), what do you think about this? > > `array_resize` should return `NULL` only if the second argument (new length) is `NULL`. I

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-06 Thread via GitHub
alan910127 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2639208217 Hello @jkosh44, what do you think about this? `array_resize` should return `NULL` only if the second argument (new length) is `NULL`. If the third argument (new eleme

Re: [I] Proper NULL handling in array functions [datafusion]

2025-02-04 Thread via GitHub
alan910127 commented on issue #14451: URL: https://github.com/apache/datafusion/issues/14451#issuecomment-2633515022 take -- 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

[I] Proper NULL handling in array functions [datafusion]

2025-02-03 Thread via GitHub
jkosh44 opened a new issue, #14451: URL: https://github.com/apache/datafusion/issues/14451 ### Describe the bug The following array functions do not properly handle NULL input, they either return an error or panic (non-exhaustive): - `array_sort` - `array_replace` - `arra