From d89c2cf4f68685062815c2573c4bf759f5edf17f Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Tue, 6 Dec 2022 00:31:27 +0800 Subject: [PATCH] update queries --- cozo-core/benches/pokec.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/cozo-core/benches/pokec.rs b/cozo-core/benches/pokec.rs index 0ba14bcc..79118fc7 100644 --- a/cozo-core/benches/pokec.rs +++ b/cozo-core/benches/pokec.rs @@ -440,9 +440,8 @@ fn neighbours_2_filter() { .run_script( r#" l1[to] := *friends{fr: $id, to} - l2[to] := l1[to] - l2[to] := l1[fr], *friends{fr, to} - ?[to] := l2[to], *user{uid: to, age}, coalesce(age, 0) >= 18 + ?[to] := l1[to], *user{uid: to, age}, coalesce(age, 0) >= 18 + ?[to] := l1[fr], *friends{fr, to}, *user{uid: to, age}, coalesce(age, 0) >= 18 "#, BTreeMap::from([("id".to_string(), json!(i))]), ) @@ -456,9 +455,8 @@ fn neighbours_2_data() { .run_script( r#" l1[to] := *friends{fr: $id, to} - l2[to] := l1[to] - l2[to] := l1[fr], *friends{fr, to} - ?[to, age, cmpl_pct, gender] := l2[to], *user{uid: to, age, cmpl_pct, gender} + ?[to, age, cmpl_pct, gender] := l1[to], *user{uid: to, age, cmpl_pct, gender} + ?[to, age, cmpl_pct, gender] := l1[fr], *friends{fr, to}, *user{uid: to, age, cmpl_pct, gender} "#, BTreeMap::from([("id".to_string(), json!(i))]), ) @@ -472,9 +470,8 @@ fn neighbours_2_filter_data() { .run_script( r#" l1[to] := *friends{fr: $id, to} - l2[to] := l1[to] - l2[to] := l1[fr], *friends{fr, to} - ?[to, age, cmpl_pct, gender] := l2[to], *user{uid: to, age, cmpl_pct, gender}, coalesce(age, 0) >= 18 + ?[to] := l1[to], *user{uid: to, age, cmpl_pct, gender}, coalesce(age, 0) >= 18 + ?[to] := l1[fr], *friends{fr, to} *user{uid: to, age, cmpl_pct, gender}, coalesce(age, 0) >= 18 "#, BTreeMap::from([("id".to_string(), json!(i))]), )