Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 31 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,40 +93,38 @@ each of the 30 queries run in the benchmark.

## High-level results

| Query | neo4j-2025.12.1 (ms) | kuzu-0.11.3 (ms) | ladybug-0.14.1 (ms) | lance-graph-0.5.1 (ms) |
| Query | neo4j-2025.12.1 (ms) | kuzu-0.11.3 (ms) | ladybug-0.14.1 (ms) | lance-graph-0.5.2 (ms) |
| --- | --- | --- | --- | --- |
| q1 | 5.7ms | 2.4ms (2.4x) | 2.1ms (2.7x) | 1.5ms (3.9x) |
| q2 | 6.4ms | 1.5ms (4.4x) | 1.5ms (4.2x) | 2.3ms (2.8x) |
| q3 | 2.8ms | 1.4ms (2.1x) | 1.2ms (2.2x) | 3.4ms (0.8x) |
| q4 | 4.8ms | 1.1ms (4.6x) | 1.1ms (4.3x) | 3.1ms (1.5x) |
| q5 | 5.1ms | 3.9ms (1.3x) | 3.6ms (1.4x) | 2.1ms (2.4x) |
| q6 | 4.1ms | 0.8ms (5.1x) | 0.9ms (4.6x) | 0.8ms (5.0x) |
| q7 | 2.2ms | 31.0ms (0.1x) | 31.1ms (0.1x) | 13.2ms (0.2x) |
| q8 | 15.6ms | 2.8ms (5.6x) | 2.8ms (5.5x) | 1.3ms (12.4x) |
| q9 | 2.6ms | 2.0ms (1.3x) | 2.2ms (1.2x) | 2.2ms (1.2x) |
| q10 | 4.9ms | 1.8ms (2.7x) | 1.9ms (2.6x) | 25.2ms (0.2x) |
| q11 | 12.9ms | 8.1ms (1.6x) | 8.4ms (1.5x) | 3.2ms (4.0x) |
| q12 | 4.7ms | 18.4ms (0.3x) | 17.9ms (0.3x) | 17.7ms (0.3x) |
| q13 | 8.8ms | 50.2ms (0.2x) | 51.6ms (0.2x) | 8.7ms (1.0x) |
| q14 | 1.6ms | 1.7ms (1.0x) | 1.8ms (0.9x) | 2.8ms (0.6x) |
| q15 | 3.2ms | 2.7ms (1.2x) | 2.7ms (1.2x) | 2.3ms (1.4x) |
| q16 | 2.0ms | 2.0ms (1.0x) | 2.0ms (1.0x) | 4.2ms (0.5x) |
| q17 | 5.3ms | 3.0ms (1.8x) | 2.9ms (1.8x) | 2.6ms (2.0x) |
| q18 | 4.1ms | 1.7ms (2.3x) | 1.8ms (2.3x) | 2.0ms (2.0x) |
| q19 | 6.1ms | 13.3ms (0.5x) | 13.6ms (0.5x) | 18.9ms (0.3x) |
| q20 | 421.8ms | 12.0ms (35.2x) | 11.1ms (38.1x) | 2.4ms (175.8x) |
| q21 | 1.6ms | 0.6ms (2.7x) | 0.6ms (2.7x) | 1.7ms (0.9x) |
| q22 | 3.7ms | 19.8ms (0.2x) | 21.2ms (0.2x) | 12.5ms (0.3x) |
| q23 | 4.0ms | 1.4ms (2.9x) | 1.4ms (2.8x) | 2.7ms (1.5x) |
| q24 | 1.5ms | 1.5ms (1.0x) | 1.6ms (1.0x) | 2.0ms (0.8x) |
| q25 | 3.1ms | 1.6ms (1.9x) | 1.7ms (1.8x) | 1.5ms (2.1x) |
| q26 | 1.8ms | 3.6ms (0.5x) | 3.8ms (0.5x) | 3.1ms (0.6x) |
| q27 | 3.4ms | 13.4ms (0.3x) | 16.0ms (0.2x) | 23.0ms (0.1x) |
| q28 | 4.3ms | 1.6ms (2.6x) | 1.9ms (2.3x) | 2.9ms (1.5x) |
| q29 | 3.1ms | 1.3ms (2.4x) | 1.3ms (2.4x) | 2.7ms (1.2x) |

> [!NOTE]
> Q30 (self-referencing pattern) is the most expensive query in this benchmark and is currently not supported in lance-graph. The lance-graph query processor is undergoing significant optimization -- follow this repo and check back in soon!
| q1 | 4.9ms | 2.3ms (2.2x) | 2.1ms (2.3x) | 1.6ms (3.1x) |
| q2 | 5.9ms | 1.4ms (4.1x) | 1.5ms (3.9x) | 2.4ms (2.5x) |
| q3 | 2.9ms | 1.2ms (2.4x) | 1.3ms (2.3x) | 3.4ms (0.9x) |
| q4 | 4.1ms | 1.0ms (4.0x) | 1.0ms (4.0x) | 3.1ms (1.3x) |
| q5 | 4.9ms | 3.8ms (1.3x) | 3.7ms (1.3x) | 2.1ms (2.3x) |
| q6 | 3.9ms | 0.8ms (5.0x) | 0.8ms (4.6x) | 0.8ms (4.6x) |
| q7 | 2.2ms | 31.1ms (0.1x) | 31.6ms (0.1x) | 13.3ms (0.2x) |
| q8 | 14.6ms | 2.9ms (5.1x) | 2.9ms (5.1x) | 1.3ms (11.3x) |
| q9 | 2.8ms | 2.1ms (1.4x) | 2.2ms (1.3x) | 2.2ms (1.3x) |
| q10 | 4.9ms | 1.8ms (2.7x) | 1.9ms (2.6x) | 25.3ms (0.2x) |
| q11 | 14.9ms | 8.5ms (1.8x) | 8.1ms (1.8x) | 3.3ms (4.5x) |
| q12 | 8.1ms | 20.7ms (0.4x) | 16.9ms (0.5x) | 18.0ms (0.4x) |
| q13 | 9.9ms | 50.8ms (0.2x) | 51.5ms (0.2x) | 8.9ms (1.1x) |
| q14 | 1.7ms | 1.7ms (1.0x) | 1.8ms (0.9x) | 2.9ms (0.6x) |
| q15 | 3.3ms | 2.7ms (1.2x) | 2.7ms (1.2x) | 2.3ms (1.4x) |
| q16 | 2.4ms | 2.0ms (1.2x) | 2.0ms (1.2x) | 4.4ms (0.5x) |
| q17 | 4.9ms | 3.0ms (1.6x) | 3.0ms (1.7x) | 2.7ms (1.8x) |
| q18 | 3.7ms | 1.8ms (2.0x) | 1.8ms (2.0x) | 2.2ms (1.7x) |
| q19 | 7.8ms | 12.4ms (0.6x) | 14.1ms (0.6x) | 19.3ms (0.4x) |
| q20 | 475.7ms | 11.9ms (39.9x) | 10.9ms (43.6x) | 2.6ms (183.6x) |
| q21 | 1.8ms | 0.6ms (3.2x) | 0.6ms (3.1x) | 1.7ms (1.0x) |
| q22 | 3.6ms | 24.2ms (0.2x) | 22.3ms (0.2x) | 13.7ms (0.3x) |
| q23 | 3.9ms | 1.4ms (2.8x) | 1.6ms (2.5x) | 2.7ms (1.4x) |
| q24 | 1.6ms | 1.5ms (1.1x) | 1.5ms (1.1x) | 2.0ms (0.8x) |
| q25 | 3.1ms | 1.8ms (1.7x) | 1.7ms (1.8x) | 1.5ms (2.1x) |
| q26 | 1.8ms | 3.7ms (0.5x) | 3.6ms (0.5x) | 3.1ms (0.6x) |
| q27 | 3.5ms | 15.2ms (0.2x) | 15.4ms (0.2x) | 23.0ms (0.2x) |
| q28 | 3.9ms | 1.7ms (2.3x) | 1.8ms (2.2x) | 2.8ms (1.4x) |
| q29 | 2.9ms | 1.3ms (2.3x) | 1.2ms (2.4x) | 2.7ms (1.1x) |
| q30 | 1255.2ms | 158.7ms (7.9x) | 154.4ms (8.1x) | 31.3ms (40.1x) |

The fastest and slowest systems for each query can be visualized via the following heatmap.

Expand Down
81 changes: 41 additions & 40 deletions kuzu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,54 +52,55 @@ The benchmark can be run using the following command. The results are output to

```bash
❯ uv run pytest benchmark_query.py --benchmark-min-rounds=5 --benchmark-warmup-iterations=5 --benchmark-disable-gc --benchmark-sort=fullname
==================================== test session starts ====================================
============================================== test session starts ===============================================
platform darwin -- Python 3.13.7, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=True min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=5)
rootdir: /Users/prrao/code/graph-benchmark-ldbc-snb
configfile: pyproject.toml
plugins: anyio-4.12.1, benchmark-5.2.3, asyncio-1.3.0, Faker-40.1.2
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 29 items

benchmark_query.py ............................. [100%]


------------------------------------------------------------------------------------ benchmark: 29 tests ------------------------------------------------------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_query1 2.2577 (4.66) 2.6252 (3.30) 2.3674 (4.00) 0.1256 (2.17) 2.3013 (3.96) 0.1035 (1.40) 1;1 422.4013 (0.25) 7 1
test_benchmark_query10 1.5427 (3.19) 2.1656 (2.73) 1.7854 (3.02) 0.1151 (1.99) 1.7797 (3.07) 0.1413 (1.91) 68;2 560.0853 (0.33) 219 1
test_benchmark_query11 7.6476 (15.80) 8.9412 (11.25) 8.0510 (13.61) 0.2907 (5.01) 8.0069 (13.79) 0.3396 (4.59) 20;5 124.2076 (0.07) 76 1
test_benchmark_query12 14.4927 (29.94) 27.4369 (34.53) 18.3637 (31.05) 3.8226 (65.95) 16.2928 (28.07) 5.7663 (78.01) 4;0 54.4552 (0.03) 15 1
test_benchmark_query13 48.4199 (100.02) 51.4664 (64.77) 50.2393 (84.96) 0.8729 (15.06) 50.3359 (86.72) 1.4880 (20.13) 7;0 19.9047 (0.01) 18 1
test_benchmark_query14 1.4160 (2.92) 1.9150 (2.41) 1.6599 (2.81) 0.1091 (1.88) 1.6518 (2.85) 0.1297 (1.75) 51;1 602.4426 (0.36) 155 1
test_benchmark_query15 2.4607 (5.08) 3.2792 (4.13) 2.6984 (4.56) 0.1264 (2.18) 2.6811 (4.62) 0.1637 (2.21) 86;5 370.5902 (0.22) 278 1
test_benchmark_query16 1.7999 (3.72) 2.1456 (2.70) 1.9558 (3.31) 0.0769 (1.33) 1.9431 (3.35) 0.1080 (1.46) 36;0 511.3071 (0.30) 102 1
test_benchmark_query17 2.7153 (5.61) 3.4063 (4.29) 2.9574 (5.00) 0.1463 (2.52) 2.9277 (5.04) 0.1782 (2.41) 46;9 338.1399 (0.20) 184 1
test_benchmark_query18 1.4720 (3.04) 7.3080 (9.20) 1.7397 (2.94) 0.3661 (6.32) 1.6984 (2.93) 0.1279 (1.73) 5;10 574.8125 (0.34) 383 1
test_benchmark_query19 8.9191 (18.42) 23.9760 (30.18) 13.2692 (22.44) 3.6640 (63.22) 12.7555 (21.98) 4.3972 (59.49) 14;2 75.3626 (0.04) 50 1
test_benchmark_query2 1.3465 (2.78) 1.9035 (2.40) 1.4589 (2.47) 0.0886 (1.53) 1.4350 (2.47) 0.1081 (1.46) 18;1 685.4362 (0.41) 79 1
test_benchmark_query20 10.9251 (22.57) 25.8535 (32.54) 11.9840 (20.27) 2.5636 (44.23) 11.2959 (19.46) 0.2591 (3.51) 3;6 83.4447 (0.05) 36 1
test_benchmark_query21 0.4841 (1.0) 0.7945 (1.0) 0.5913 (1.0) 0.0580 (1.0) 0.5804 (1.0) 0.0739 (1.0) 76;6 1,691.0646 (1.0) 250 1
test_benchmark_query22 13.8039 (28.51) 30.7185 (38.66) 19.8331 (33.54) 4.4588 (76.93) 19.3723 (33.38) 6.9103 (93.49) 9;0 50.4206 (0.03) 29 1
test_benchmark_query23 1.1496 (2.37) 4.3593 (5.49) 1.3911 (2.35) 0.2145 (3.70) 1.3585 (2.34) 0.0933 (1.26) 19;32 718.8361 (0.43) 610 1
test_benchmark_query24 1.2693 (2.62) 2.0424 (2.57) 1.5169 (2.57) 0.1056 (1.82) 1.5078 (2.60) 0.1322 (1.79) 107;2 659.2339 (0.39) 353 1
test_benchmark_query25 1.4011 (2.89) 1.9984 (2.52) 1.6455 (2.78) 0.1158 (2.00) 1.6369 (2.82) 0.1343 (1.82) 104;10 607.7344 (0.36) 325 1
test_benchmark_query26 3.2755 (6.77) 10.1319 (12.75) 3.6176 (6.12) 0.5596 (9.65) 3.5371 (6.09) 0.2210 (2.99) 4;6 276.4285 (0.16) 175 1
test_benchmark_query27 9.4421 (19.50) 24.2963 (30.58) 13.3928 (22.65) 3.3355 (57.55) 14.2491 (24.55) 5.3340 (72.16) 30;1 74.6672 (0.04) 81 1
test_benchmark_query28 1.3805 (2.85) 1.9694 (2.48) 1.6460 (2.78) 0.0947 (1.63) 1.6314 (2.81) 0.1175 (1.59) 130;11 607.5488 (0.36) 472 1
test_benchmark_query29 1.0577 (2.18) 3.9660 (4.99) 1.2988 (2.20) 0.2884 (4.98) 1.2493 (2.15) 0.1126 (1.52) 9;15 769.9662 (0.46) 285 1
test_benchmark_query3 1.1598 (2.40) 4.8344 (6.08) 1.3517 (2.29) 0.4075 (7.03) 1.2684 (2.19) 0.0970 (1.31) 3;11 739.8151 (0.44) 126 1
test_benchmark_query4 0.9308 (1.92) 1.2335 (1.55) 1.0504 (1.78) 0.0711 (1.23) 1.0377 (1.79) 0.0961 (1.30) 66;0 952.0332 (0.56) 194 1
test_benchmark_query5 3.5945 (7.42) 4.5954 (5.78) 3.9005 (6.60) 0.1726 (2.98) 3.9024 (6.72) 0.2002 (2.71) 23;2 256.3742 (0.15) 89 1
test_benchmark_query6 0.6538 (1.35) 3.6604 (4.61) 0.8143 (1.38) 0.1904 (3.28) 0.7678 (1.32) 0.1126 (1.52) 29;29 1,228.0319 (0.73) 336 1
test_benchmark_query7 29.8127 (61.58) 40.9078 (51.49) 31.0440 (52.50) 2.0570 (35.49) 30.6197 (52.75) 0.8259 (11.17) 1;1 32.2124 (0.02) 27 1
test_benchmark_query8 2.5916 (5.35) 3.1906 (4.02) 2.7599 (4.67) 0.1295 (2.23) 2.7272 (4.70) 0.1475 (2.00) 35;8 362.3276 (0.21) 138 1
test_benchmark_query9 1.8081 (3.73) 2.3520 (2.96) 2.0342 (3.44) 0.1250 (2.16) 2.0075 (3.46) 0.1910 (2.58) 65;0 491.6035 (0.29) 203 1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
collected 30 items

benchmark_query.py .............................. [100%]


-------------------------------------------------------------------------------------- benchmark: 30 tests ---------------------------------------------------------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_query1 2.1209 (4.50) 2.6556 (3.34) 2.2756 (3.96) 0.1363 (2.94) 2.2485 (3.97) 0.1500 (2.90) 3;1 439.4414 (0.25) 14 1
test_benchmark_query10 1.6590 (3.52) 4.6478 (5.84) 1.8253 (3.18) 0.1547 (3.34) 1.8034 (3.19) 0.0939 (1.81) 24;21 547.8598 (0.31) 487 1
test_benchmark_query11 7.9723 (16.91) 9.1218 (11.46) 8.5255 (14.84) 0.2622 (5.66) 8.4948 (15.00) 0.4197 (8.11) 29;0 117.2955 (0.07) 80 1
test_benchmark_query12 16.2808 (34.54) 34.7569 (43.65) 20.7133 (36.05) 3.3054 (71.33) 20.3600 (35.96) 2.2653 (43.77) 7;4 48.2782 (0.03) 35 1
test_benchmark_query13 49.2052 (104.40) 59.5040 (74.73) 50.7832 (88.40) 2.2413 (48.36) 50.2405 (88.74) 0.7761 (15.00) 1;2 19.6916 (0.01) 19 1
test_benchmark_query14 1.4937 (3.17) 1.9786 (2.48) 1.6776 (2.92) 0.0824 (1.78) 1.6659 (2.94) 0.1000 (1.93) 111;9 596.0949 (0.34) 379 1
test_benchmark_query15 2.5168 (5.34) 3.1308 (3.93) 2.7355 (4.76) 0.0941 (2.03) 2.7249 (4.81) 0.1155 (2.23) 87;9 365.5617 (0.21) 348 1
test_benchmark_query16 1.8140 (3.85) 2.2756 (2.86) 1.9688 (3.43) 0.0689 (1.49) 1.9644 (3.47) 0.0859 (1.66) 102;6 507.9228 (0.29) 334 1
test_benchmark_query17 2.7828 (5.90) 8.5874 (10.78) 3.0171 (5.25) 0.4188 (9.04) 2.9600 (5.23) 0.1179 (2.28) 6;17 331.4425 (0.19) 281 1
test_benchmark_query18 1.6130 (3.42) 2.3325 (2.93) 1.8234 (3.17) 0.0949 (2.05) 1.8152 (3.21) 0.1185 (2.29) 121;13 548.4163 (0.32) 459 1
test_benchmark_query19 8.5983 (18.24) 23.7949 (29.88) 12.4075 (21.60) 2.7082 (58.44) 12.0801 (21.34) 3.5131 (67.88) 17;2 80.5965 (0.05) 71 1
test_benchmark_query2 1.2590 (2.67) 2.0387 (2.56) 1.4312 (2.49) 0.0977 (2.11) 1.4153 (2.50) 0.1035 (2.00) 61;13 698.6901 (0.40) 279 1
test_benchmark_query20 11.1750 (23.71) 21.4228 (26.90) 11.9200 (20.75) 1.4845 (32.03) 11.4913 (20.30) 0.4432 (8.56) 5;10 83.8925 (0.05) 70 1
test_benchmark_query21 0.4713 (1.0) 0.7962 (1.0) 0.5745 (1.0) 0.0527 (1.14) 0.5661 (1.0) 0.0655 (1.27) 197;20 1,740.6530 (1.0) 724 1
test_benchmark_query22 14.6594 (31.10) 37.5509 (47.16) 24.2478 (42.21) 4.5574 (98.34) 23.0444 (40.70) 5.4208 (104.75) 10;2 41.2409 (0.02) 43 1
test_benchmark_query23 1.2525 (2.66) 4.4241 (5.56) 1.3910 (2.42) 0.1410 (3.04) 1.3794 (2.44) 0.0798 (1.54) 16;15 718.8820 (0.41) 587 1
test_benchmark_query24 1.3565 (2.88) 4.7922 (6.02) 1.5415 (2.68) 0.2381 (5.14) 1.5109 (2.67) 0.0840 (1.62) 21;27 648.7317 (0.37) 642 1
test_benchmark_query25 1.4541 (3.09) 5.7062 (7.17) 1.7919 (3.12) 0.2492 (5.38) 1.7626 (3.11) 0.1363 (2.63) 14;15 558.0717 (0.32) 552 1
test_benchmark_query26 3.4484 (7.32) 4.1133 (5.17) 3.6787 (6.40) 0.1269 (2.74) 3.6656 (6.47) 0.1743 (3.37) 87;1 271.8387 (0.16) 250 1
test_benchmark_query27 10.2395 (21.72) 32.9692 (41.41) 15.2078 (26.47) 4.0537 (87.48) 14.4512 (25.53) 3.5987 (69.54) 14;5 65.7559 (0.04) 73 1
test_benchmark_query28 1.5180 (3.22) 3.8031 (4.78) 1.6778 (2.92) 0.1362 (2.94) 1.6551 (2.92) 0.1071 (2.07) 51;22 596.0221 (0.34) 486 1
test_benchmark_query29 1.0736 (2.28) 3.6777 (4.62) 1.2813 (2.23) 0.1644 (3.55) 1.2672 (2.24) 0.0824 (1.59) 16;21 780.4858 (0.45) 724 1
test_benchmark_query3 1.0963 (2.33) 1.8806 (2.36) 1.2479 (2.17) 0.1060 (2.29) 1.2198 (2.15) 0.1051 (2.03) 65;22 801.3508 (0.46) 408 1
test_benchmark_query30 148.6766 (315.44) 171.5846 (215.49) 158.6827 (276.21) 8.2511 (178.05) 157.0752 (277.45) 12.4123 (239.85) 2;0 6.3019 (0.00) 7 1
test_benchmark_query4 0.8992 (1.91) 1.2998 (1.63) 1.0380 (1.81) 0.0605 (1.30) 1.0327 (1.82) 0.0733 (1.42) 142;13 963.3932 (0.55) 517 1
test_benchmark_query5 3.5444 (7.52) 4.1010 (5.15) 3.7562 (6.54) 0.0961 (2.07) 3.7504 (6.62) 0.1137 (2.20) 53;3 266.2274 (0.15) 181 1
test_benchmark_query6 0.6662 (1.41) 1.0573 (1.33) 0.7689 (1.34) 0.0463 (1.0) 0.7576 (1.34) 0.0518 (1.0) 234;33 1,300.5784 (0.75) 924 1
test_benchmark_query7 29.4940 (62.58) 42.5176 (53.40) 31.1065 (54.15) 2.2509 (48.57) 30.7164 (54.26) 0.8056 (15.57) 2;2 32.1476 (0.02) 31 1
test_benchmark_query8 2.6213 (5.56) 3.2949 (4.14) 2.8580 (4.97) 0.1185 (2.56) 2.8365 (5.01) 0.1521 (2.94) 58;6 349.8981 (0.20) 220 1
test_benchmark_query9 1.8395 (3.90) 5.8372 (7.33) 2.0653 (3.59) 0.2929 (6.32) 2.0221 (3.57) 0.1272 (2.46) 7;15 484.1951 (0.28) 432 1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
OPS: Operations Per Second, computed as 1 / Mean
==================================== 29 passed in 15.92s ====================================
============================================== 30 passed in 25.36s ===============================================
```
6 changes: 3 additions & 3 deletions kuzu/benchmark_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,6 @@ def test_benchmark_query29(benchmark, connection):
_assert_single_value(result, "has_written_post_with_safari", False)


# def test_benchmark_query30(benchmark, connection):
# result = benchmark(query.run_query30, connection)
# _assert_single_value(result, "has_self_reply", True)
def test_benchmark_query30(benchmark, connection):
result = benchmark(query.run_query30, connection)
_assert_single_value(result, "has_self_reply", True)
6 changes: 3 additions & 3 deletions kuzu/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def run_query29(conn: Connection):
def run_query30(conn: Connection):
"Are there comments replying to posts created by the same person?"
query = """
MATCH (c:Comment)-[:commentHasCreator]->(p:Person)
<-[:postHasCreator]-(post:Post)<-[:replyOfPost]-(c)
MATCH (c:Comment)-[:commentHasCreator]->(creator:Person),
(c)-[:replyOfPost]->(post:Post)-[:postHasCreator]->(creator)
RETURN COUNT(DISTINCT c.ID) > 0 AS has_self_reply;
"""
return _execute(conn, 30, query)
Expand Down Expand Up @@ -371,7 +371,7 @@ def run_query30(conn: Connection):
27: run_query27,
28: run_query28,
29: run_query29,
# 30: run_query30, # Disabled: self-reply query
30: run_query30,
}


Expand Down
Loading