From 54754e539332d569ce72ee47528cbb43ad24a47d Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 31 Dec 2024 12:28:18 +0100 Subject: Remove println --- co-purchase-analysis/src/main/scala/Main.scala | 9 --------- 1 file changed, 9 deletions(-) diff --git a/co-purchase-analysis/src/main/scala/Main.scala b/co-purchase-analysis/src/main/scala/Main.scala index a55be03..a12c850 100644 --- a/co-purchase-analysis/src/main/scala/Main.scala +++ b/co-purchase-analysis/src/main/scala/Main.scala @@ -106,15 +106,6 @@ object CoPurchaseAnalysis { * RDD containing CoPurchase instances with purchase frequency counts */ def processData(data: RDD[OrderProduct]): RDD[String] = { - data - .groupBy(_.orderId) - .flatMap { case (_, orders) => - orders.map(_.productId).toSeq.sorted.combinations(2).map { - case List(p1, p2) => - ProductPair(Math.min(p1, p2), Math.max(p1, p2)) -> 1 - } - } - .foreach(println) data .groupBy(_.orderId) .flatMap { case (_, orders) => -- cgit v1.2.3-18-g5258