Abacn commented on code in PR #34738:
URL: https://github.com/apache/beam/pull/34738#discussion_r2136724931


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowMetrics.java:
##########
@@ -206,12 +210,21 @@ private StringSetResult getStringSetValue(MetricUpdate 
metricUpdate) {
     }
 
     private BoundedTrieResult getBoundedTrieValue(MetricUpdate metricUpdate) {
-      if (metricUpdate.getTrie() == null) {
+      BoundedTrieData trieData = null;
+      Object trieFromResponse = metricUpdate.getBoundedTrie();
+      // Fail-safely cast Trie returned by dataflow API to BoundedTrieResult
+      if (trieFromResponse instanceof BoundedTrie) {
+        BoundedTrie bTrie = (BoundedTrie) metricUpdate.getBoundedTrie();
+        trieData = BoundedTrieData.fromProto(bTrie);

Review Comment:
   Thanks for catching this. Fixed.



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to