You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2020/03/10 04:43:37 UTC

[GitHub] [madlib] fmcquillan99 commented on a change in pull request #486: Graph: Filter out infinite paths

fmcquillan99 commented on a change in pull request #486: Graph: Filter out infinite paths
URL: https://github.com/apache/madlib/pull/486#discussion_r390092705
 
 

 ##########
 File path: src/ports/postgres/modules/graph/measures.py_in
 ##########
 @@ -184,10 +184,7 @@ class Graph(object):
                 -- Filtering 'Infinity' occurs in CASE instead of WHERE clause
                 -- so that the edge is part of the average value i.e. part of
                 -- the count of paths but zero addition to sum of distances.
-                AVG(CASE WHEN {e.weight} = 'Infinity'::double precision
-                            THEN 0::double precision
-                            ELSE {e.weight}::double precision
-                    END) as avg_path_length
+                AVG({e.weight}::double precision) as avg_path_length
 
 Review comment:
   @njayaram2 Wondering if you recall this and and can provide some guidance here?  thanks

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services