beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Yellin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-524) Description of "type" argument in Aggregator is incorrect
Date Thu, 04 Aug 2016 16:11:20 GMT

     [ https://issues.apache.org/jira/browse/BEAM-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Frank Yellin updated BEAM-524:
------------------------------
    Description: 
Two problems with documentation for "type" argument.

Trivial:  Remove "by default".  This phrase implies that there are other alternatives besides
what is listed.  There aren't.

Non trivial.  The documentation says "types appropriate to the combine_fn" are accepted. 
I tried 
        Accumulator("foo", max, datetime.datetime)
This failed even though "datetime.datetime" is a perfectly reasonable type to want to take
the max of.  (I wanted to know precisely when the last job finished.)

Either the documentation needs to be changed to specify that max/min only apply to numeric
types, or the code needs to be changed to allow other uses of min and max.

I suspect that the other operators also suffer similar limitations.  I doubt that I'd be allowed
to sum numpy arrays, even though they support +.


  was:
Two problems with documentation for "type" argument.

Trivial:  Remove "by default".  This phrase implies that there are other alternatives besides
what is listed.  There aren't.

Non trivial.  The documentation says "types appropriate to the combine_fn" are accepted. 
I tried 
        Accumulator("foo", max, datetime.datetime)
This failed even though "datetime.datetime" is a perfectly reasonable type to want to take
the max of.  (I wanted to know precisely when the last job finished.)

Either the documentation needs to be changed to specify that max/min only apply to numeric
types, or the code needs to be changed to allow other uses of min and max.



> Description of "type" argument in Aggregator is incorrect
> ---------------------------------------------------------
>
>                 Key: BEAM-524
>                 URL: https://issues.apache.org/jira/browse/BEAM-524
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py
>            Reporter: Frank Yellin
>            Priority: Minor
>
> Two problems with documentation for "type" argument.
> Trivial:  Remove "by default".  This phrase implies that there are other alternatives
besides what is listed.  There aren't.
> Non trivial.  The documentation says "types appropriate to the combine_fn" are accepted.
 I tried 
>         Accumulator("foo", max, datetime.datetime)
> This failed even though "datetime.datetime" is a perfectly reasonable type to want to
take the max of.  (I wanted to know precisely when the last job finished.)
> Either the documentation needs to be changed to specify that max/min only apply to numeric
types, or the code needs to be changed to allow other uses of min and max.
> I suspect that the other operators also suffer similar limitations.  I doubt that I'd
be allowed to sum numpy arrays, even though they support +.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message