[ 
https://issues.apache.org/jira/browse/ARROW-11871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297453#comment-17297453
 ] 

ARF edited comment on ARROW-11871 at 3/8/21, 3:20 PM:
------------------------------------------------------

[~jorisvandenbossche] For what it's worth, in my book {{null != 0}}. To me 
{{null}} has absolutely nothing to do with the value {{0}}. To me {{null}} 
indicates an invalid or non-existent value and the name {{null}} is merely a 
(maybe unfortunate) historical artifact.

As a consequence in my opinion, the following should hold: {{power(null, 0) == 
null}} as well as {{power(1, null) == null}}.
 I read this as: (either) one of two operands of a binary operator is invalid 
or missing, hence the result is invalid or missing as well.

With this convention, if a user wants a different behaviour they can always use 
{{fill_null(0)}} to ensure that {{power(fill_null(null, 0), 0) == 1}} and 
{{power(1, fill_null(null, 0)) == 1}}. The converse is not true.

Also, I believe explicit is better than implicit...


was (Author: arf1):
[~jorisvandenbossche] For what it's worth, in my book {{null != 0}}. To me 
{{null}} has absolutely nothing to do with the value {{0}}. To me {{null}} 
indicates an invalid or non-existent value and the name {{null}} is merely a 
(maybe unfortunate) historical artifact.

As a consequence in my opinion, the following should hold: {{power(null, 0) == 
null}} as well as {{power(1, null) == null}}.
 I read this as: (either) one of two function inputs is invalid or missing, 
hence the result is invalid or missing as well.

With this convention, if a user wants a different behaviour they can always use 
{{fill_null(0)}} to ensure that {{power(fill_null(null, 0), 0) == 1}} and 
{{power(1, fill_null(null, 0)) == 1}}. The converse is not true.

Also, I believe explicit is better than implicit...

> [C++] Add element-wise power() compute function
> -----------------------------------------------
>
>                 Key: ARROW-11871
>                 URL: https://issues.apache.org/jira/browse/ARROW-11871
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 3.0.0
>            Reporter: ARF
>            Priority: Minor
>
> It would be nice to have an element-wise {{power()}} compute function.
> I.e. in analogy to 
> [numpy.power()|https://numpy.org/doc/stable/reference/generated/numpy.power.html].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to