diff --git a/01_ingest/grebi_ingest_sqlite/src/main.rs b/01_ingest/grebi_ingest_sqlite/src/main.rs index 483776e..5473d01 100644 --- a/01_ingest/grebi_ingest_sqlite/src/main.rs +++ b/01_ingest/grebi_ingest_sqlite/src/main.rs @@ -75,7 +75,6 @@ fn main() -> Result<()> { if fk_info.is_some() { json_obj[&col_name] = json!(format!("{}:{}:{}", prefix, fk_info.unwrap().0.to_singular(), v)); - ids.push(format!("{}:{}:{}", fk_info.unwrap().0.to_singular(), prefix, v)); } else { json_obj[&col_name] = json!(v); } diff --git a/02_assign_ids/grebi_identifiers2groups/src/main.rs b/02_assign_ids/grebi_identifiers2groups/src/main.rs index c83bcc2..b6bdfbf 100644 --- a/02_assign_ids/grebi_identifiers2groups/src/main.rs +++ b/02_assign_ids/grebi_identifiers2groups/src/main.rs @@ -1,5 +1,5 @@ -use std::collections::{HashSet, HashMap, BTreeMap}; +use std::collections::{BTreeSet, BTreeMap}; use std::{env, io}; use csv; use bloomfilter::Bloom; @@ -21,7 +21,7 @@ struct Args { fn main() { - let mut group_to_entities:BTreeMap>> = BTreeMap::new(); + let mut group_to_entities:BTreeMap>> = BTreeMap::new(); let mut entity_to_group:BTreeMap, u64> = BTreeMap::new(); let mut next_group_id:u64 = 1; @@ -29,7 +29,7 @@ fn main() { let args = Args::parse(); let add_group:Vec = args.add_group; for group in add_group { - let entries:HashSet> = group.split(",").map(|s| s.as_bytes().to_vec()).collect(); + let entries:BTreeSet> = group.split(",").map(|s| s.as_bytes().to_vec()).collect(); let gid = next_group_id; next_group_id = next_group_id + 1; for id in &entries { @@ -103,7 +103,7 @@ fn main() { for id in &ids { entity_to_group.insert(id.to_vec(), target_group); } - group_to_entities.insert(target_group, ids.iter().map(|id| id.to_vec()).collect::>()); + group_to_entities.insert(target_group, ids.iter().map(|id| id.to_vec()).collect::>()); } }