MCPcopy Create free account
hub / github.com/Pometry/Raphtory / get_column_names_from_props

Function get_column_names_from_props

raphtory/src/python/utils/export.rs:109–135  ·  view source on GitHub ↗
(
    column_names: &mut Vec<String>,
    edge_meta: &Meta,
)

Source from the content-addressed store, hash-verified

107}
108
109pub(crate) fn get_column_names_from_props(
110 column_names: &mut Vec<String>,
111 edge_meta: &Meta,
112) -> HashSet<String> {
113 let mut is_prop_both_temp_and_const: HashSet<String> = HashSet::new();
114 let temporal_properties: HashSet<ArcStr> = edge_meta
115 .temporal_prop_mapper()
116 .keys()
117 .iter()
118 .cloned()
119 .collect();
120 let metadata: HashSet<ArcStr> = edge_meta.metadata_mapper().keys().iter().cloned().collect();
121 metadata
122 .intersection(&temporal_properties)
123 .for_each(|name| {
124 column_names.push(format!("{}_metadata", name));
125 column_names.push(format!("{}_temporal", name));
126 is_prop_both_temp_and_const.insert(name.to_string());
127 });
128 metadata
129 .symmetric_difference(&temporal_properties)
130 .for_each(|name| {
131 column_names.push(name.to_string());
132 });
133 column_names.push("update_history".parse().unwrap());
134 is_prop_both_temp_and_const
135}
136
137pub(crate) fn create_row(
138 convert_datetime: bool,

Callers 2

to_dfMethod · 0.85
to_dfMethod · 0.85

Calls 11

temporal_prop_mapperMethod · 0.80
metadata_mapperMethod · 0.80
to_stringMethod · 0.80
unwrapMethod · 0.80
collectMethod · 0.45
clonedMethod · 0.45
iterMethod · 0.45
keysMethod · 0.45
intersectionMethod · 0.45
pushMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected