From e563e653351b85b03e0614f6e700fcc3ee905612 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 11 May 2020 14:11:44 +0200 Subject: [PATCH] moved check from join to method --- .../dhp/blacklist/SparkRemoveBlacklistedRelationJob.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dhp-workflows/dhp-blacklist/src/main/java/eu/dnetlib/dhp/blacklist/SparkRemoveBlacklistedRelationJob.java b/dhp-workflows/dhp-blacklist/src/main/java/eu/dnetlib/dhp/blacklist/SparkRemoveBlacklistedRelationJob.java index 1a47a0724..6abfc70bd 100644 --- a/dhp-workflows/dhp-blacklist/src/main/java/eu/dnetlib/dhp/blacklist/SparkRemoveBlacklistedRelationJob.java +++ b/dhp-workflows/dhp-blacklist/src/main/java/eu/dnetlib/dhp/blacklist/SparkRemoveBlacklistedRelationJob.java @@ -119,8 +119,7 @@ public class SparkRemoveBlacklistedRelationJob { .and( inputRelation .col("target") - .equalTo(dedupBL.col("target")) - .and(inputRelation.col("relclass").equalTo(dedupBL.col("relclass"))))), + .equalTo(dedupBL.col("target")))), "left_outer"); log.info("numberOfRelationAfterJoin: {}", tmp.count()); @@ -151,7 +150,8 @@ public class SparkRemoveBlacklistedRelationJob { private static boolean areEquals(Relation ir, Relation bl) { return ir.getRelClass().equals(bl.getRelClass()) && ir.getRelType().equals(bl.getRelType()) && - ir.getSubRelType().equals(bl.getSubRelType()); + ir.getSubRelType().equals(bl.getSubRelType()) && + ir.getRelClass().equals(bl.getRelClass()); } public static org.apache.spark.sql.Dataset readRelations(