Skip to content

Commit 743841b

Browse files
committed
refactor: 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 06620cc commit 743841b

File tree

67 files changed

+119
-115
lines changed

Some content is hidden

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

67 files changed

+119
-115
lines changed

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
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

spec/regression/logistics/tests/create-many/aql/create.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ RETURN (
236236
"handlingUnits": (
237237
FOR v_handlingUnit1
238238
IN OUTBOUND v_Delivery1 @@deliveries_handlingUnits
239-
FILTER v_handlingUnit1 != null
239+
FILTER v_handlingUnit1._key != null
240240
SORT (v_handlingUnit1.`huNumber`)
241241
RETURN {
242242
"huNumber": v_handlingUnit1.`huNumber`

spec/regression/logistics/tests/create-many/aql/query.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RETURN {
6363
"handlingUnits": (
6464
FOR v_handlingUnit1
6565
IN OUTBOUND v_delivery1 @@deliveries_handlingUnits
66-
FILTER v_handlingUnit1 != null
66+
FILTER v_handlingUnit1._key != null
6767
SORT (v_handlingUnit1.`huNumber`)
6868
RETURN {
6969
"huNumber": v_handlingUnit1.`huNumber`

spec/regression/logistics/tests/create-with-to-many-relation/aql/check.aql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ RETURN {
99
"handlingUnits": (
1010
FOR v_handlingUnit1
1111
IN OUTBOUND v_delivery1 @@deliveries_handlingUnits
12-
FILTER v_handlingUnit1 != null
12+
FILTER v_handlingUnit1._key != null
1313
LET v_delivery2 = FIRST((
1414
FOR v_node1
1515
IN INBOUND v_handlingUnit1 @@deliveries_handlingUnits
16-
FILTER v_node1 != null
16+
FILTER v_node1._key != null
1717
RETURN v_node1
1818
))
1919
RETURN {

spec/regression/logistics/tests/create-with-to-one-relation/aql/check.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RETURN {
77
LET v_delivery1 = FIRST((
88
FOR v_node1
99
IN INBOUND v_handlingUnit1 @@deliveries_handlingUnits
10-
FILTER v_node1 != null
10+
FILTER v_node1._key != null
1111
RETURN v_node1
1212
))
1313
RETURN {

spec/regression/logistics/tests/delete-all-related/aql/deleteByDelivery.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RETURN (
55
FILTER (FIRST((
66
FOR v_node1
77
IN INBOUND v_handlingUnit1 @@deliveries_handlingUnits
8-
FILTER v_node1 != null
8+
FILTER v_node1._key != null
99
RETURN v_node1
1010
))._key == @var1)
1111
SORT (v_handlingUnit1.`huNumber`)

spec/regression/logistics/tests/delete-all-related/aql/deliveries.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RETURN {
77
LET v_delivery1 = FIRST((
88
FOR v_node1
99
IN INBOUND v_handlingUnit1 @@deliveries_handlingUnits
10-
FILTER v_node1 != null
10+
FILTER v_node1._key != null
1111
RETURN v_node1
1212
))
1313
RETURN {

spec/regression/logistics/tests/field-permission-denied/aql/select.aql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LET v_handlingUnit1 = FIRST((
1616
LET v_delivery3 = FIRST((
1717
FOR v_node1
1818
IN INBOUND v_handlingUnit1 @@deliveries_handlingUnits
19-
FILTER v_node1 != null
19+
FILTER v_node1._key != null
2020
RETURN v_node1
2121
))
2222
LET v_country1 = FIRST((

0 commit comments

Comments
 (0)