|
@@ -172,14 +172,16 @@ object diff_data_20250319 {
|
|
|
val diff = math.abs(num1.doubleValue() - num2.doubleValue())
|
|
|
if (diff > 0) {
|
|
|
if (countJsonObject1.containsKey(key)) {
|
|
|
- countJsonObject1.put(key, diff)
|
|
|
- } else {
|
|
|
countJsonObject1.put(key, countJsonObject1.getDouble(key) + diff)
|
|
|
+ } else {
|
|
|
+ countJsonObject1.put(key, diff)
|
|
|
+
|
|
|
}
|
|
|
if (countJsonObject2.containsKey(key)) {
|
|
|
- countJsonObject2.put(key, 1)
|
|
|
- } else {
|
|
|
countJsonObject2.put(key, countJsonObject2.getIntValue(key) + 1)
|
|
|
+ } else {
|
|
|
+ countJsonObject2.put(key, 1)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
featureDiffSum(key) = featureDiffSum.getOrElse(key, 0.0) + diff
|
|
@@ -190,9 +192,10 @@ object diff_data_20250319 {
|
|
|
val str2 = if (value2 != null) value2 else ""
|
|
|
if (str1 != str2) {
|
|
|
if (countJsonObject2.containsKey(key)) {
|
|
|
- countJsonObject2.put(key, 1)
|
|
|
- } else {
|
|
|
countJsonObject2.put(key, countJsonObject2.getIntValue(key) + 1)
|
|
|
+ } else {
|
|
|
+ countJsonObject2.put(key, 1)
|
|
|
+
|
|
|
}
|
|
|
featureCount(key) = featureCount.getOrElse(key, 0) + 1
|
|
|
}
|