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

Thomas Weise commented on BEAM-5509:
------------------------------------

The unwanted conversion to floating point occurs in 
[https://github.com/apache/beam/blob/6f10dd36b7f01758675e244f6da86f27bcbcea6a/sdks/python/apache_beam/runners/job/utils.py#L30]
{code:java}
json_format.Parse(json.dumps(dict_obj), struct_pb2.Struct()){code}
Specifically, when the json (which does not contain a floating point literal is 
turned back to the struct.

Converting all int and long values to string prior to calling this utility 
avoids the issue.

> Python pipeline_options doesn't handle int type
> -----------------------------------------------
>
>                 Key: BEAM-5509
>                 URL: https://issues.apache.org/jira/browse/BEAM-5509
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-harness
>            Reporter: Thomas Weise
>            Assignee: Robert Bradshaw
>            Priority: Major
>              Labels: portability-flink
>
> The int option supplied at the command line is turned into a decimal during 
> serialization and then the parser in SDK harness fails to restore it as int.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to