1 /*********************************************************************** 2 * Copyright (c) 2013-2024 Commonwealth Computer Research, Inc. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Apache License, Version 2.0 5 * which accompanies this distribution and is available at 6 * http://www.opensource.org/licenses/apache2.0.php. 7 ***********************************************************************/ 8 9 package org.locationtech.geomesa.spark.sql 10 11 import org.apache.spark.sql.SQLContext 12 import org.locationtech.geomesa.spark.isUsingSedona 13 import org.locationtech.geomesa.spark.jts._ 14 import org.locationtech.geomesa.spark.sedona._ 15 16 object SQLTypes { 17 18 def init(sqlContext: SQLContext): Unit = { 19 initJTS(sqlContext) 20 SQLRules.registerOptimizations(sqlContext) 21 GeometricDistanceFunctions.registerFunctions(sqlContext) 22 if (isUsingSedona) { 23 initSedona(sqlContext) 24 } 25 } 26 }
| Line | Stmt Id | Pos | Tree | Symbol | Tests | Code |
|---|---|---|---|---|---|---|
| 19 | 72631 | 760 - 779 | Apply | org.locationtech.geomesa.spark.jts.initJTS | org.locationtech.geomesa.spark.jts.`package`.initJTS(sqlContext) | |
| 20 | 72632 | 784 - 826 | Apply | org.locationtech.geomesa.spark.sql.SQLRules.registerOptimizations | SQLRules.registerOptimizations(sqlContext) | |
| 21 | 72633 | 831 - 887 | Apply | org.locationtech.geomesa.spark.sql.GeometricDistanceFunctions.registerFunctions | GeometricDistanceFunctions.registerFunctions(sqlContext) | |
| 22 | 72634 | 896 - 909 | Select | org.locationtech.geomesa.spark.isUsingSedona | org.locationtech.geomesa.spark.`package`.isUsingSedona | |
| 22 | 72637 | 892 - 892 | Literal | <nosymbol> | () | |
| 22 | 72638 | 892 - 892 | Block | <nosymbol> | () | |
| 23 | 72635 | 919 - 941 | Apply | org.locationtech.geomesa.spark.sedona.initSedona | org.locationtech.geomesa.spark.sedona.`package`.initSedona(sqlContext) | |
| 23 | 72636 | 919 - 941 | Block | org.locationtech.geomesa.spark.sedona.initSedona | org.locationtech.geomesa.spark.sedona.`package`.initSedona(sqlContext) |