[
https://issues.apache.org/jira/browse/FLINK-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004373#comment-15004373
]
ASF GitHub Bot commented on FLINK-2441:
---------------------------------------
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/1352
[FLINK-2441] Introduce Python OperationInfo
Introduces an OperationInfo object to the Python API, replacing the
previously used dictionary.
This is mostly a cosmetic change, making code shorter (and IMO more
readable) within DataSet and ExecutionEnvironment and making the general
structure more similar to the Java side.
Furthermore all fields are initialized with a default value.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 2441_pyopinfo
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1352.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1352
----
commit ce23a695355db363c96eeec5c639b0597f802f96
Author: zentol <[email protected]>
Date: 2015-07-24T18:18:47Z
[FLINK-2441] Introduce Python OperationInfo
Introduces an OperationInfo object, replacing the previously used
dictionary. This change generally makes related code shorter.
----
> [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)