فهرست منبع

统计缺少的key

xueyiming 2 ماه پیش
والد
کامیت
375dd1f2e8
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/main/scala/com/aliyun/odps/spark/examples/makedata_ad/v20240718/diff_data_20240718.scala

+ 2 - 2
src/main/scala/com/aliyun/odps/spark/examples/makedata_ad/v20240718/diff_data_20240718.scala

@@ -63,11 +63,11 @@ object diff_data_20240718 {
           if (map2.contains(key) && value1 != map2(key)) {
             val res = s"LogKey: $logkey, Key: $key, RDD1 Value: $value1, RDD2 Value: ${map2(key)}"
             println(res)
-            result += res
+            result = result :+ res
           } else if (!map2.contains(key)) {
             val res = s"LogKey: $logkey, Key: $key, RDD1 Value: $value1, RDD2 does not have this key"
             println(res)
-            result += res
+            result = result :+ res
           }
         }
       }