Github user mktal commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/22#discussion_r54285600
  
    --- Diff: methods/array_ops/src/pg_gp/array_ops.c ---
    @@ -702,8 +702,14 @@ array_sub(PG_FUNCTION_ARGS){
     PG_FUNCTION_INFO_V1(array_mult);
     Datum
     array_mult(PG_FUNCTION_ARGS){
    -    if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
    -    if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
    +    if (PG_ARGISNULL(0) && PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
    --- End diff --
    
    Generally I try to avoid treating NULL as `zero` in multiplication because 
it produces zero even though only one entry of your data is NULL. Having said 
that, in numpy `np.nan*2 = np.nan`. But  `np.nan + 2` also results in np.nan.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to