[ 
https://issues.apache.org/jira/browse/BEAM-10876?focusedWorklogId=482178&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-482178
 ]

ASF GitHub Bot logged work on BEAM-10876:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Sep/20 17:09
            Start Date: 11/Sep/20 17:09
    Worklog Time Spent: 10m 
      Work Description: y1chi commented on a change in pull request #12817:
URL: https://github.com/apache/beam/pull/12817#discussion_r487177713



##########
File path: sdks/python/apache_beam/runners/dataflow/dataflow_metrics.py
##########
@@ -210,6 +210,14 @@ def _get_metric_value(self, metric):
       dist_sum = _get_match(
           metric.distribution.object_value.properties,
           lambda x: x.key == 'sum').value.integer_value
+      if not dist_sum:
+        # distribution metric is not meant to use on large values, but in case
+        # it is, the value can overflow and become double_value, the 
correctness
+        # of the value may not be guaranteed.
+        dist_sum = int(

Review comment:
       done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 482178)
    Time Spent: 1h 40m  (was: 1.5h)

> Dataflow metric query result throws TypeError when the distribution sum is 
> large
> --------------------------------------------------------------------------------
>
>                 Key: BEAM-10876
>                 URL: https://issues.apache.org/jira/browse/BEAM-10876
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-dataflow
>            Reporter: Yichi Zhang
>            Assignee: Yichi Zhang
>            Priority: P2
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> When the sum value is large the properties type become double_value, the 
> integer_value will be None, this leads to TypeError being thrown.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to