Result column schema: `(column_name, column_type)`. Used by the Arrow result builder to construct RecordBatches and by the DDL layer to advertise result columns.
(&self)
| 88 | /// Used by the Arrow result builder to construct RecordBatches and by |
| 89 | /// the DDL layer to advertise result columns. |
| 90 | pub fn result_schema(&self) -> &'static [(&'static str, AlgoColumnType)] { |
| 91 | use AlgoColumnType::*; |
| 92 | match self { |
| 93 | Self::PageRank => &[("node_id", Text), ("rank", Float64)], |
| 94 | Self::Wcc => &[("node_id", Text), ("component_id", Int64)], |
| 95 | Self::LabelPropagation => &[("node_id", Text), ("community_id", Int64)], |
| 96 | Self::Lcc => &[("node_id", Text), ("coefficient", Float64)], |
| 97 | Self::Sssp => &[("node_id", Text), ("distance", Float64)], |
| 98 | Self::Betweenness => &[("node_id", Text), ("centrality", Float64)], |
| 99 | Self::Closeness => &[("node_id", Text), ("centrality", Float64)], |
| 100 | Self::Harmonic => &[("node_id", Text), ("centrality", Float64)], |
| 101 | Self::Degree => &[("node_id", Text), ("centrality", Float64)], |
| 102 | Self::Louvain => &[ |
| 103 | ("node_id", Text), |
| 104 | ("community_id", Int64), |
| 105 | ("modularity", Float64), |
| 106 | ], |
| 107 | Self::Triangles => &[("node_id", Text), ("triangles", Int64)], |
| 108 | Self::Diameter => &[("diameter", Int64), ("radius", Int64)], |
| 109 | Self::KCore => &[("node_id", Text), ("coreness", Int64)], |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /// Column type for algorithm result schemas. |
no outgoing calls