From 79c624c96abb1c201f983ad3f9c0f9724bb30c21 Mon Sep 17 00:00:00 2001 From: ioannispan Date: Fri, 30 Aug 2024 15:05:23 +0200 Subject: [PATCH] Remove validation that is not needed anymoer --- .../centrality/CentralityProcedureFacade.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/procedures/algorithms-facade/src/main/java/org/neo4j/gds/procedures/algorithms/centrality/CentralityProcedureFacade.java b/procedures/algorithms-facade/src/main/java/org/neo4j/gds/procedures/algorithms/centrality/CentralityProcedureFacade.java index 2f0b88166b..b79888c643 100644 --- a/procedures/algorithms-facade/src/main/java/org/neo4j/gds/procedures/algorithms/centrality/CentralityProcedureFacade.java +++ b/procedures/algorithms-facade/src/main/java/org/neo4j/gds/procedures/algorithms/centrality/CentralityProcedureFacade.java @@ -846,7 +846,6 @@ public MutateStub eigenVectorMutateS } public Stream eigenvectorStats(String graphName, Map configuration) { - validateKeyNotPresent(configuration, "dampingFactor"); var shouldComputeSimilarityDistribution = procedureReturnColumns.contains("centralityDistribution"); var resultBuilder = new PageRankResultBuilderForStatsMode(shouldComputeSimilarityDistribution); @@ -864,7 +863,6 @@ public Stream eigenvectorStatsEstimate( Object graphNameOrConfiguration, Map algorithmConfiguration ) { - validateKeyNotPresent(algorithmConfiguration, "dampingFactor"); var result = estimationMode.runEstimation( algorithmConfiguration, @@ -876,7 +874,6 @@ public Stream eigenvectorStatsEstimate( } public Stream eigenvectorStream(String graphName, Map configuration) { - validateKeyNotPresent(configuration, "dampingFactor"); var resultBuilder = new PageRankResultBuilderForStreamMode(); @@ -893,7 +890,6 @@ public Stream eigenvectorStreamEstimate( Object graphNameOrConfiguration, Map algorithmConfiguration ) { - validateKeyNotPresent(algorithmConfiguration, "dampingFactor"); var result = estimationMode.runEstimation( algorithmConfiguration, @@ -905,7 +901,6 @@ public Stream eigenvectorStreamEstimate( } public Stream eigenvectorWrite(String graphName, Map configuration) { - validateKeyNotPresent(configuration, "dampingFactor"); var shouldComputeCentralityDistribution = procedureReturnColumns.contains("centralityDistribution"); var resultBuilder = new PageRankResultBuilderForWriteMode(shouldComputeCentralityDistribution); @@ -923,7 +918,6 @@ public Stream eigenvectorWriteEstimate( Object graphNameOrConfiguration, Map algorithmConfiguration ) { - validateKeyNotPresent(algorithmConfiguration, "dampingFactor"); var result = estimationMode.runEstimation( algorithmConfiguration, @@ -1060,9 +1054,4 @@ public Stream pageRankWriteEstimate( return Stream.of(result); } - private void validateKeyNotPresent(Map configuration, String key) { - if (configuration.containsKey(key)) { - throw new IllegalArgumentException("Unexpected configuration key: " + key); - } - } }