You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by GitBox <gi...@apache.org> on 2022/04/25 10:47:30 UTC

[GitHub] [incubator-sedona] krishnarb3 opened a new pull request, #624: Add ST_BuildArea function and tests

krishnarb3 opened a new pull request, #624:
URL: https://github.com/apache/incubator-sedona/pull/624

   
   ## Did you read the Contributor Guide?
   
   - Yes, I have read [Contributor Rules](https://sedona.apache.org/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/community/develop/)
   
   ## Is this PR related to a JIRA ticket?
   
   - Yes, the URL of the assoicated JIRA ticket is https://issues.apache.org/jira/browse/SEDONA-XXX. The PR name follows the format `[SEDONA-XXX] my subject`.
   
   
   ## What changes were proposed in this PR?
   
   - ST_BuildArea function
   
   ## How was this patch tested?
   
   - Scala, Python, Java integration tests
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation update.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-sedona] krishnarb3 commented on a diff in pull request #624: [SEDONA-120] Add ST_BuildArea function and tests

Posted by GitBox <gi...@apache.org>.
krishnarb3 commented on code in PR #624:
URL: https://github.com/apache/incubator-sedona/pull/624#discussion_r857575820


##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Functions.scala:
##########
@@ -1782,3 +1782,26 @@ case class ST_XMin(inputExpressions: Seq[Expression])
     copy(inputExpressions = newChildren)
   }
 }
+
+
+/**
+ * Returns the areal geometry formed by the constituent linework of the input geometry assuming assumes all inner geometries represent holes
+ *
+ * @param inputExpressions
+ */
+case class ST_BuildArea(inputExpressions: Seq[Expression])
+  extends UnaryGeometryExpression with CodegenFallback {
+  assert(inputExpressions.length == 1)
+
+  override protected def nullSafeEval(geometry: Geometry): Any = {

Review Comment:
   Should this be a nullable function?



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-sedona] jiayuasu commented on a diff in pull request #624: [SEDONA-120] Add ST_BuildArea function and tests

Posted by GitBox <gi...@apache.org>.
jiayuasu commented on code in PR #624:
URL: https://github.com/apache/incubator-sedona/pull/624#discussion_r858189730


##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Functions.scala:
##########
@@ -1782,3 +1782,26 @@ case class ST_XMin(inputExpressions: Seq[Expression])
     copy(inputExpressions = newChildren)
   }
 }
+
+
+/**
+ * Returns the areal geometry formed by the constituent linework of the input geometry assuming assumes all inner geometries represent holes
+ *
+ * @param inputExpressions
+ */
+case class ST_BuildArea(inputExpressions: Seq[Expression])
+  extends UnaryGeometryExpression with CodegenFallback {
+  assert(inputExpressions.length == 1)
+
+  override protected def nullSafeEval(geometry: Geometry): Any = {

Review Comment:
   Yes, this should be a nullable function. So no need to extend UnaryGeometryExpression



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-sedona] krishnarb3 commented on pull request #624: [SEDONA-120] Add ST_BuildArea function and tests

Posted by GitBox <gi...@apache.org>.
krishnarb3 commented on PR #624:
URL: https://github.com/apache/incubator-sedona/pull/624#issuecomment-1109206623

   @jiayuasu Have fixed the test failures, seems to be a transient issue with the CI


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-sedona] jiayuasu merged pull request #624: [SEDONA-120] Add ST_BuildArea function and tests

Posted by GitBox <gi...@apache.org>.
jiayuasu merged PR #624:
URL: https://github.com/apache/incubator-sedona/pull/624


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-sedona] krishnarb3 commented on a diff in pull request #624: [SEDONA-120] Add ST_BuildArea function and tests

Posted by GitBox <gi...@apache.org>.
krishnarb3 commented on code in PR #624:
URL: https://github.com/apache/incubator-sedona/pull/624#discussion_r858302949


##########
sql/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/Functions.scala:
##########
@@ -1782,3 +1782,26 @@ case class ST_XMin(inputExpressions: Seq[Expression])
     copy(inputExpressions = newChildren)
   }
 }
+
+
+/**
+ * Returns the areal geometry formed by the constituent linework of the input geometry assuming assumes all inner geometries represent holes
+ *
+ * @param inputExpressions
+ */
+case class ST_BuildArea(inputExpressions: Seq[Expression])
+  extends UnaryGeometryExpression with CodegenFallback {
+  assert(inputExpressions.length == 1)
+
+  override protected def nullSafeEval(geometry: Geometry): Any = {

Review Comment:
   Have updated the function and added null checks



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org