yitao-li commented on a change in pull request #525: URL: https://github.com/apache/incubator-sedona/pull/525#discussion_r634581062
########## File path: sql/src/main/scala/org/apache/sedona/sql/utils/Adapter.scala ########## @@ -166,8 +169,9 @@ object Adapter { if (fieldNames != null && fieldNames.nonEmpty) { val userData = "" + geom.getUserData.asInstanceOf[String] val fields = userData.split("\t") -// geom.setUserData(null) // Set to null will lead to the null pointer exception of the previous line. Not sure why. - (Seq(geom), fields) + val geomWithoutUserData = geom.copy + geomWithoutUserData.setUserData(null) + (Seq(geomWithoutUserData), fields) Review comment: I guess while we are at it, we should also address this issue here as well (even though it's not as bad as a null pointer exception) -- also, see test case with pairrdd that should cover this code path -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org