pitrou commented on issue #34987: URL: https://github.com/apache/arrow/issues/34987#issuecomment-3607440465
> [@pitrou](https://github.com/pitrou) Do you not think my comment [#34987 (comment)](https://github.com/apache/arrow/issues/34987#issuecomment-3552310153) and [#34993 (comment)](https://github.com/apache/arrow/pull/34993#issuecomment-1685415286) here make a good case why this behavior may be undesirable? No, I don't :) > Well, as I explained in [#34993 (comment)](https://github.com/apache/arrow/pull/34993#issuecomment-1685415286) this could have some unexpected consequences, and it may be safer to actually error on casting `null` to `bool`. It is unavoidable that casting to `bool` loses some information, so you are assumed to have thought of the various cases. Disallowing `bool(pa.scalar(None))` while `bool(None)` is allowed would not be very user-friendly. > My worry is that by allowing `Null` to be cast to `False`, one: > > 1. gains very little > 2. has the potential for very nasty bugs if one forget to check for `Null` The same can be said of casting Null to True, though, so that doesn't sound like a good argument. @jorisvandenbossche What do you think about this? -- 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]
