From b6ee2341ddb358c73030ad3043770b96655dfd29 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 26 Sep 2024 01:11:13 +1000 Subject: [PATCH] Fix spelling; rename file --- ...Partitons.scala => AggregateWithinPartitions.scala} | 2 +- .../org/apache/sedona/viz/sql/optVizOperatorTest.scala | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) rename spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/{AggregateWithinPartitons.scala => AggregateWithinPartitions.scala} (99%) diff --git a/spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitons.scala b/spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitions.scala similarity index 99% rename from spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitons.scala rename to spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitions.scala index 3ef49aaf83..9f4a69fc94 100644 --- a/spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitons.scala +++ b/spark/common/src/main/scala/org/apache/sedona/viz/sql/operator/AggregateWithinPartitions.scala @@ -26,7 +26,7 @@ import org.apache.spark.sql.{DataFrame, Row} import scala.collection.mutable import scala.collection.mutable.ArrayBuffer -object AggregateWithinPartitons { +object AggregateWithinPartitions { /** * Run aggregation within each partition without incurring a data shuffle. Currently support diff --git a/spark/common/src/test/scala/org/apache/sedona/viz/sql/optVizOperatorTest.scala b/spark/common/src/test/scala/org/apache/sedona/viz/sql/optVizOperatorTest.scala index f4ab6870af..6aa000105e 100644 --- a/spark/common/src/test/scala/org/apache/sedona/viz/sql/optVizOperatorTest.scala +++ b/spark/common/src/test/scala/org/apache/sedona/viz/sql/optVizOperatorTest.scala @@ -18,7 +18,7 @@ */ package org.apache.sedona.viz.sql -import org.apache.sedona.viz.sql.operator.{AggregateWithinPartitons, VizPartitioner} +import org.apache.sedona.viz.sql.operator.{AggregateWithinPartitions, VizPartitioner} import org.apache.sedona.viz.sql.utils.{Conf, LineageDecoder} import org.apache.spark.sql.functions.lit import org.locationtech.jts.geom.Envelope @@ -43,7 +43,11 @@ class optVizOperatorTest extends VizTestBase { // Test aggregation within partitions val result = - AggregateWithinPartitons(newDf.withColumn("weight", lit(100.0)), "pixel", "weight", "avg") + AggregateWithinPartitions( + newDf.withColumn("weight", lit(100.0)), + "pixel", + "weight", + "avg") assert(result.rdd.getNumPartitions == secondaryPID) // Test the colorize operator @@ -71,7 +75,7 @@ class optVizOperatorTest extends VizTestBase { assert(newDf.rdd.getNumPartitions == secondaryPID) // Test aggregation within partitions - val result = AggregateWithinPartitons(newDf, "pixel", "weight", "count") + val result = AggregateWithinPartitions(newDf, "pixel", "weight", "count") assert(result.rdd.getNumPartitions == secondaryPID) // Test the colorize operator