|
@@ -231,10 +231,11 @@ object makedata_ad_33_bucketDataFromOriginToHive_20250522 {
|
|
|
|
|
|
// 使用函数式方式处理所有键
|
|
|
reqFeatureKeys.foreach { key =>
|
|
|
- reqFeature.get(key) match {
|
|
|
- case Some(value) if value != null && value.toString.nonEmpty =>
|
|
|
- featureMap.put(key, value.toString)
|
|
|
- case _ => // 不做任何操作
|
|
|
+ val value = reqFeature.getString(key)
|
|
|
+
|
|
|
+ // 检查值是否非空
|
|
|
+ if (value != null && value.nonEmpty) {
|
|
|
+ featureMap.put(key, value)
|
|
|
}
|
|
|
}
|
|
|
|