Skip to content

Commit

Permalink
fix tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmurariu committed Jan 23, 2025
1 parent 0380159 commit 2f02c36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
8 changes: 3 additions & 5 deletions raphtory/src/io/arrow/df_loaders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ pub(crate) fn load_nodes_from_df<
Ok(())
}

pub const NO_COLS: Option<&[&str]> = None;

pub(crate) fn load_edges_from_df<
G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps + InternalCache,
>(
Expand Down Expand Up @@ -629,7 +627,7 @@ mod tests {
db::graph::graph::assert_graph_equal,
io::arrow::{
dataframe::{DFChunk, DFView},
df_loaders::{load_edges_from_df, NO_COLS},
df_loaders::load_edges_from_df,
},
prelude::*,
test_utils::build_edge_list,
Expand Down Expand Up @@ -855,7 +853,7 @@ mod tests {
let df_view = build_df(chunk_size, &edges);
let g = Graph::new();
let props = ["str_prop", "int_prop"];
load_edges_from_df(df_view, "time", "src", "dst", Some(&props), NO_COLS, None, None, None, &g).unwrap();
load_edges_from_df(df_view, "time", "src", "dst", Some(&props), None::<&[String]>, None, None, None, &g).unwrap();
let g2 = Graph::new();
for (src, dst, time, str_prop, int_prop) in edges {
g2.add_edge(time, src, dst, [("str_prop", str_prop.clone().into_prop()), ("int_prop", int_prop.into_prop())], None).unwrap();
Expand All @@ -875,7 +873,7 @@ mod tests {
let cache_file = TempDir::new().unwrap();
g.cache(cache_file.path()).unwrap();
let props = ["str_prop", "int_prop"];
load_edges_from_df(df_view, "time", "src", "dst", Some(&props), NO_COLS, None, None, None, &g).unwrap();
load_edges_from_df(df_view, "time", "src", "dst", Some(&props), None::<&[String]>, None, None, None, &g).unwrap();
let g = Graph::load_cached(cache_file.path()).unwrap();
let g2 = Graph::new();
for (src, dst, time, str_prop, int_prop) in edges {
Expand Down
2 changes: 1 addition & 1 deletion raphtory/src/io/arrow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mod test {
"src",
"dst",
Some(&["prop1", "prop2"]),
NO_COLS,
None::<&[String]>,
None,
layer_name,
layer_col,
Expand Down
12 changes: 4 additions & 8 deletions raphtory/src/serialise/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ use crate::{
},
graph::views::deletion_graph::PersistentGraph,
},
io::{
arrow::df_loaders::NO_COLS,
parquet_loaders::{
load_edge_deletions_from_parquet, load_edge_props_from_parquet,
load_edges_from_parquet, load_graph_props_from_parquet, load_node_props_from_parquet,
load_nodes_from_parquet,
},
io::parquet_loaders::{
load_edge_deletions_from_parquet, load_edge_props_from_parquet, load_edges_from_parquet,
load_graph_props_from_parquet, load_node_props_from_parquet, load_nodes_from_parquet,
},
prelude::*,
serialise::parquet::{
Expand Down Expand Up @@ -292,7 +288,7 @@ fn decode_graph_storage(
SRC_COL,
DST_COL,
Some(&t_prop_columns),
NO_COLS,
None::<&[String]>,
None,
None,
Some(LAYER_COL),
Expand Down

0 comments on commit 2f02c36

Please sign in to comment.