You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2015/07/30 21:05:04 UTC

[jira] [Created] (FLINK-2441) [py] Introduce an OpInfo object on the python side

Chesnay Schepler created FLINK-2441:
---------------------------------------

             Summary: [py] Introduce an OpInfo object on the python side
                 Key: FLINK-2441
                 URL: https://issues.apache.org/jira/browse/FLINK-2441
             Project: Flink
          Issue Type: Improvement
          Components: Python API
            Reporter: Chesnay Schepler
            Assignee: Chesnay Schepler
            Priority: Trivial


All information required to construct on operation are currently saved in a plain dictionary on the python side, whose fields are generally accessed using a variety of string constants.

so right now you find lines like: 
{code}
op_info[_Fields.KEYS] = keys
{code}
The following shortcomings exist in the current system:
# There is no central place to define default values. This is done all over the place, to some extent in a redundant way,
# It produces fairly long code,
# is surprisingly cumbersome to write.

Instead i would like to add a separate OperationInfo object. This code be a special dictionary with preset values for each field, but due to points 2 and 3, Id prefer having an attribute for every field. the resulting code would look like this:

{code}
op_info.keys = keys
{code}

isn't that lovely.



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