Skip to content

Commit 8068414

Browse files
committed
perf: do not prevent the reduce-extraction-to-projection optimization in ArangoDB through dangling-edge filter
We currently do not trust edges - if the document they point to does not exist, we ignore the edge. In the past, this access was done via $node != null. This has the problem that ArangoDB considers it a full document access and no longer applies the reduce-extraction-to-projection optimization rule. This rule is very important to limit query memory limit usage. Removing the dangling edges filter completely would be breaking, but we can optimize them so the reduce-extraction-to-projection optimization still works.
1 parent fbeed1e commit 8068414

File tree

103 files changed

+568
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+568
-249
lines changed

spec/regression/collect/tests/collect-edge-count-access-group/aql/count.aql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RETURN {
2020
FOR v_item3
2121
IN OUTBOUND v_shipment1 @@shipments_deliveries
2222
FILTER (v_item3.`accessGroup` IN @var5)
23-
FILTER v_item3 != null
23+
FILTER v_item3._key != null
2424
RETURN v_item3
2525
)
2626
COLLECT WITH COUNT INTO v_count1
@@ -32,7 +32,7 @@ RETURN {
3232
IN (
3333
FOR v_node1, v_edge1, v_path1 IN @var6..@var7 OUTBOUND v_shipment1 @@shipments_deliveries
3434
FILTER (v_node1.`accessGroup` IN @var8)
35-
FILTER v_node1 != null
35+
FILTER v_node1._key != null
3636
RETURN v_node1
3737
)
3838
COLLECT WITH COUNT INTO v_count2

spec/regression/collect/tests/collect-edge-count/aql/countAfter.aql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RETURN {
1414
IN (
1515
FOR v_node1
1616
IN OUTBOUND v_shipment1 @@shipments_deliveries
17-
FILTER v_node1 != null
17+
FILTER v_node1._key != null
1818
RETURN v_node1
1919
)
2020
COLLECT WITH COUNT INTO v_count1
@@ -25,7 +25,7 @@ RETURN {
2525
FOR v_item2
2626
IN (
2727
FOR v_node2, v_edge1, v_path1 IN @var4..@var5 OUTBOUND v_shipment1 @@shipments_deliveries
28-
FILTER v_node2 != null
28+
FILTER v_node2._key != null
2929
RETURN v_node2
3030
)
3131
COLLECT WITH COUNT INTO v_count2

spec/regression/collect/tests/collect-edge-count/aql/countBefore.aql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RETURN {
1414
IN (
1515
FOR v_node1
1616
IN OUTBOUND v_shipment1 @@shipments_deliveries
17-
FILTER v_node1 != null
17+
FILTER v_node1._key != null
1818
RETURN v_node1
1919
)
2020
COLLECT WITH COUNT INTO v_count1
@@ -25,7 +25,7 @@ RETURN {
2525
FOR v_item2
2626
IN (
2727
FOR v_node2, v_edge1, v_path1 IN @var4..@var5 OUTBOUND v_shipment1 @@shipments_deliveries
28-
FILTER v_node2 != null
28+
FILTER v_node2._key != null
2929
RETURN v_node2
3030
)
3131
COLLECT WITH COUNT INTO v_count2

spec/regression/collect/tests/distinct-aggregation/aql/distinct.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RETURN {
1414
FOR v_item1
1515
IN (
1616
FOR v_node1, v_edge1, v_path1 IN @var3..@var4 OUTBOUND v_delivery1 @@deliveries_handlingUnits
17-
FILTER v_node1 != null
17+
FILTER v_node1._key != null
1818
RETURN v_node1.`warehouseSlot`
1919
)
2020
FILTER v_item1 != null

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct0to1.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RETURN {
2020
FILTER (v_node1.`accessGroup` IN @var6)
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
FILTER (v_node2.`accessGroup` IN @var9)
23-
FILTER v_node2 != null
23+
FILTER v_node2._key != null
2424
RETURN v_node2
2525
)
2626
SORT (v_handlingUnit1.`handlingUnitNumber`)

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct0to2.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURN {
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
PRUNE !((v_node2.`accessGroup` IN @var9))
2323
FILTER v_path2.vertices[*].`accessGroup` ALL IN @var10
24-
FILTER v_node2 != null
24+
FILTER v_node2._key != null
2525
RETURN v_node2
2626
)
2727
SORT (v_handlingUnit1.`handlingUnitNumber`)

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct1to1.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RETURN {
2020
FILTER (v_node1.`accessGroup` IN @var6)
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
FILTER (v_node2.`accessGroup` IN @var9)
23-
FILTER v_node2 != null
23+
FILTER v_node2._key != null
2424
RETURN v_node2
2525
)
2626
SORT (v_handlingUnit1.`handlingUnitNumber`)

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct1to2.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURN {
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
PRUNE !((v_node2.`accessGroup` IN @var9))
2323
FILTER v_path2.vertices[*].`accessGroup` ALL IN @var10
24-
FILTER v_node2 != null
24+
FILTER v_node2._key != null
2525
RETURN v_node2
2626
)
2727
SORT (v_handlingUnit1.`handlingUnitNumber`)

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct2to2.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURN {
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
PRUNE !((v_node2.`accessGroup` IN @var9))
2323
FILTER v_path2.vertices[*].`accessGroup` ALL IN @var10
24-
FILTER v_node2 != null
24+
FILTER v_node2._key != null
2525
RETURN v_node2
2626
)
2727
SORT (v_handlingUnit1.`handlingUnitNumber`)

spec/regression/collect/tests/recursive-relation-traversal-access-group/aql/direct3to3.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURN {
2121
FOR v_node2, v_edge2, v_path2 IN @var7..@var8 OUTBOUND v_node1 @@handlingUnits_childHandlingUnits
2222
PRUNE !((v_node2.`accessGroup` IN @var9))
2323
FILTER v_path2.vertices[*].`accessGroup` ALL IN @var10
24-
FILTER v_node2 != null
24+
FILTER v_node2._key != null
2525
RETURN v_node2
2626
)
2727
SORT (v_handlingUnit1.`handlingUnitNumber`)

0 commit comments

Comments
 (0)