From 9c0701dc8e40730591beb3b52ffb3b9f79bfc091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Mr=C4=91en?= Date: Tue, 5 May 2026 13:48:07 +0200 Subject: [PATCH] Add pyspark compatibility methods --- .../available-algorithms.mdx | 1 + .../available-algorithms/mgps.mdx | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index bf5f9648b..3a39d3759 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -181,3 +181,4 @@ This table shows the mapping between APOC functions/procedures and their Memgrap | apoc.text.regReplace | Replaces substrings matching regex with replacement | [text.regReplace()](/advanced-algorithms/available-algorithms/text#regreplace) | | apoc.util.md5 | Gets MD5 hash of concatenated string representations | [util_module.md5()](/advanced-algorithms/available-algorithms/util_module#md5) | | apoc.util.validatePredicate | Raises exception if predicate yields true with parameter interpolation | [mgps.validate_predicate()](/advanced-algorithms/available-algorithms/mgps#validate_predicate) | +| db.awaitIndexes | No-op compatibility shim for clients that wait for index creation (e.g. the Neo4j Spark connector) | [mgps.await_indexes()](/advanced-algorithms/available-algorithms/mgps#await_indexes) | diff --git a/pages/advanced-algorithms/available-algorithms/mgps.mdx b/pages/advanced-algorithms/available-algorithms/mgps.mdx index a1e77e4d5..b3b61d5df 100644 --- a/pages/advanced-algorithms/available-algorithms/mgps.mdx +++ b/pages/advanced-algorithms/available-algorithms/mgps.mdx @@ -62,3 +62,26 @@ MATCH (n:User) WHERE mgps.validate_predicate(n.age < 0, "Invalid age: %i", [n.age]) RETURN n; ``` + +### `await_indexes()` + +A no-op compatibility shim for Neo4j's `db.awaitIndexes`. Some clients +(notably the Neo4j Spark / PySpark connector) call `db.awaitIndexes` +during initialization to block until pending indexes are online. Memgraph +builds indexes synchronously, so there is nothing to wait for — this +procedure exists purely so those clients can connect without changes. + + +This procedure is equivalent to **db.awaitIndexes**. + + +{

Input:

} + +- `seconds: integer` ➡ Accepted for parity with the Neo4j signature. + The value is ignored. + +{

Usage:

} + +```cypher +CALL mgps.await_indexes(300); +```