Skip to content

Commit

Permalink
[SEDONA-697] Make getGeometryColumnName a public function (#1760)
Browse files Browse the repository at this point in the history
Co-authored-by: jameswillis <james@wherobots.com>
  • Loading branch information
james-willis and jameswillis authored Jan 17, 2025
1 parent 7fc20b1 commit 53c176c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.apache.sedona.stats

import org.apache.sedona.stats.Util.getGeometryColumnName
import org.apache.sedona.util.DfUtils.getGeometryColumnName
import org.apache.spark.sql.functions._
import org.apache.spark.sql.sedona_sql.expressions.st_functions.{ST_Distance, ST_DistanceSpheroid}
import org.apache.spark.sql.{Column, DataFrame}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.apache.sedona.stats.clustering

import org.apache.sedona.stats.Util.getGeometryColumnName
import org.apache.sedona.util.DfUtils.getGeometryColumnName
import org.apache.spark.sql.functions._
import org.apache.spark.sql.sedona_sql.UDT.GeometryUDT
import org.apache.spark.sql.sedona_sql.expressions.st_functions.{ST_Distance, ST_DistanceSpheroid}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.apache.sedona.stats.outlierDetection

import org.apache.sedona.stats.Util.getGeometryColumnName
import org.apache.sedona.util.DfUtils.getGeometryColumnName
import org.apache.spark.sql.sedona_sql.expressions.st_functions.{ST_Distance, ST_DistanceSphere}
import org.apache.spark.sql.{Column, DataFrame, SparkSession, functions => f}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sedona.stats
package org.apache.sedona.util

import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.sedona_sql.UDT.GeometryUDT

private[stats] object Util {
object DfUtils {
def getGeometryColumnName(dataframe: DataFrame): String = {
val geomFields = dataframe.schema.fields.filter(_.dataType == GeometryUDT)

Expand Down

0 comments on commit 53c176c

Please sign in to comment.