Copilot commented on code in PR #2801:
URL: https://github.com/apache/sedona/pull/2801#discussion_r3006839289
##########
common/src/test/java/org/apache/sedona/common/S2Geography/TestHelper.java:
##########
@@ -172,8 +176,8 @@ public static void checkWKBGeography(String wkbHex, String
expectedWKT) throws P
boolean isEqual = compareTo(geoWKT, geoWKT) == 0;
Review Comment:
`checkWKBGeography` computes `isEqual` by calling `compareTo(geoWKT,
geoWKT)`, which compares the same object and will always return 0. This makes
the test effectively always pass and prevents the debug logging from ever
triggering. Update this to compare the decoded WKB geography against the
expected WKT geography (e.g., `compareTo(geoWKB, geoWKT)`).
```suggestion
boolean isEqual = compareTo(geoWKB, geoWKT) == 0;
```
##########
spark/common/src/main/scala/org/apache/sedona/core/showcase/ScalaEarthdataMapperRunnableExample.scala:
##########
@@ -47,7 +47,7 @@ object ScalaEarthdataMapperRunnableExample extends App {
testSpatialRangeQuery()
testSpatialRangeQueryUsingIndex()
sc.stop()
- System.out.println("All Earthdata DEMOs passed!")
+ println("All Earthdata DEMOs passed!")
Review Comment:
This replaces `System.out.println` with `println`, which still prints to
stdout. If the intent is to avoid console output during builds/runs, consider
using the logging framework instead.
##########
spark/common/src/main/scala/org/apache/sedona/viz/showcase/ScalaExample.scala:
##########
@@ -96,16 +97,15 @@ object ScalaExample extends App {
val HDFDataVariableList = Array("LST", "QC", "Error_LST", "Emis_31",
"Emis_32")
val HDFswitchXY = true
val urlPrefix = System.getProperty("user.dir") +
"/../spark/common/src/test/resources/modis/"
- var ConfFile = new FileInputStream(resourcePath + "babylon.point.properties")
if (buildScatterPlot(scatterPlotOutputPath) &&
buildHeatMap(heatMapOutputPath)
&& buildChoroplethMap(choroplethMapOutputPath) &&
parallelFilterRenderStitch(
parallelFilterRenderStitchOutputPath + "-stitched")
&& parallelFilterRenderNoStitch(
parallelFilterRenderStitchOutputPath) && earthdataVisualization(
earthdataScatterPlotOutputPath))
- System.out.println("All 5 Demos have passed.")
- else System.out.println("Demos failed.")
+ println("All 5 Demos have passed.")
+ else println("Demos failed.")
Review Comment:
These status messages were switched from `System.out.println` to `println`,
which still writes to stdout. If the goal is to eliminate stdout noise (per PR
description), consider routing these through the existing logging framework
(e.g., Log4j/SLF4J) instead of `println`.
##########
spark/common/src/main/scala/org/apache/sedona/core/showcase/ScalaExample.scala:
##########
@@ -73,7 +73,7 @@ object ScalaExample extends App {
testDistanceJoinQuery()
testDistanceJoinQueryUsingIndex()
sc.stop()
- System.out.println("All DEMOs passed!")
+ println("All DEMOs passed!")
Review Comment:
This replaces `System.out.println` with `println`, which still emits to
stdout. If the intent is to reduce Maven build/test console noise consistently,
prefer using the project logger here as well.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]