From adb12c0db91503db741bfc64879247f490311e0c Mon Sep 17 00:00:00 2001 From: pawelkocinski Date: Tue, 24 Sep 2024 19:13:59 +0200 Subject: [PATCH] Add other missing data types. --- .../services/org.apache.spark.sql.sources.DataSourceRegister | 1 + .../sql}/datasources/geopackage/GeoPackageDataSource.scala | 4 ++-- .../datasources/geopackage/GeoPackagePartitionReader.scala | 2 +- .../geopackage/GeoPackagePartitionReaderFactory.scala | 2 +- .../sedona/sql}/datasources/geopackage/GeoPackageScan.scala | 2 +- .../sql}/datasources/geopackage/GeoPackageScanBuilder.scala | 2 +- .../sedona/sql}/datasources/geopackage/GeoPackageTable.scala | 2 +- .../sql}/datasources/geopackage/GeoPackageDataSource.scala | 4 ++-- .../datasources/geopackage/GeoPackagePartitionReader.scala | 2 +- .../geopackage/GeoPackagePartitionReaderFactory.scala | 2 +- .../sedona/sql}/datasources/geopackage/GeoPackageScan.scala | 2 +- .../sql}/datasources/geopackage/GeoPackageScanBuilder.scala | 2 +- .../sedona/sql}/datasources/geopackage/GeoPackageTable.scala | 2 +- 13 files changed, 15 insertions(+), 14 deletions(-) rename spark/spark-3.4/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackageDataSource.scala (97%) rename spark/spark-3.4/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackagePartitionReader.scala (97%) rename spark/{spark-3.5/src/main/scala/org/apache/spark/sql/execution => spark-3.4/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackagePartitionReaderFactory.scala (96%) rename spark/{spark-3.5/src/main/scala/org/apache/spark/sql/execution => spark-3.4/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackageScan.scala (96%) rename spark/spark-3.4/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackageScanBuilder.scala (96%) rename spark/{spark-3.5/src/main/scala/org/apache/spark/sql/execution => spark-3.4/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackageTable.scala (97%) rename spark/spark-3.5/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackageDataSource.scala (97%) rename spark/spark-3.5/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackagePartitionReader.scala (97%) rename spark/{spark-3.4/src/main/scala/org/apache/spark/sql/execution => spark-3.5/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackagePartitionReaderFactory.scala (96%) rename spark/{spark-3.4/src/main/scala/org/apache/spark/sql/execution => spark-3.5/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackageScan.scala (96%) rename spark/spark-3.5/src/main/scala/org/apache/{spark/sql/execution => sedona/sql}/datasources/geopackage/GeoPackageScanBuilder.scala (96%) rename spark/{spark-3.4/src/main/scala/org/apache/spark/sql/execution => spark-3.5/src/main/scala/org/apache/sedona/sql}/datasources/geopackage/GeoPackageTable.scala (97%) diff --git a/spark/spark-3.4/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister b/spark/spark-3.4/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister index 39b7d446c8..ad9b6968e0 100644 --- a/spark/spark-3.4/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister +++ b/spark/spark-3.4/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister @@ -1,4 +1,5 @@ org.apache.spark.sql.execution.datasources.parquet.GeoParquetFileFormat org.apache.spark.sql.execution.datasources.v2.geoparquet.metadata.GeoParquetMetadataDataSource org.apache.sedona.sql.datasources.shapefile.ShapefileDataSource +org.apache.spark.sql.execution.datasources.parquet.GeoParquetFileFormat org.apache.sedona.sql.datasources.geopackage.GeoPackageDataSource diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala similarity index 97% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala index 590ad6ea55..5e3f14694d 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager -import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, TableType} import org.apache.sedona.sql.datasources.geopackage.model.TableType.TableType +import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, TableType} import org.apache.spark.sql.connector.catalog.Table import org.apache.spark.sql.execution.datasources.FileFormat import org.apache.spark.sql.execution.datasources.v2.FileDataSourceV2 diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala similarity index 97% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala index 94262388bf..630162e5e1 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager import org.apache.sedona.sql.datasources.geopackage.model.TableType.{FEATURES, METADATA, TILES, UNKNOWN} diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala similarity index 96% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala index 23e355ad11..af61740eb9 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, PartitionOptions, TableType} diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala similarity index 96% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala index 892385ba11..6a6da90ecf 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions import org.apache.spark.sql.SparkSession diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala similarity index 96% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala index 2d1b4b1ad9..88f50535b6 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions import org.apache.spark.sql.SparkSession diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala similarity index 97% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala rename to spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala index e926fd2e2c..b7e101e4a8 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala +++ b/spark/spark-3.4/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.hadoop.fs.FileStatus import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala similarity index 97% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala index 590ad6ea55..5e3f14694d 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageDataSource.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageDataSource.scala @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager -import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, TableType} import org.apache.sedona.sql.datasources.geopackage.model.TableType.TableType +import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, TableType} import org.apache.spark.sql.connector.catalog.Table import org.apache.spark.sql.execution.datasources.FileFormat import org.apache.spark.sql.execution.datasources.v2.FileDataSourceV2 diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala similarity index 97% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala index 94262388bf..630162e5e1 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReader.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReader.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager import org.apache.sedona.sql.datasources.geopackage.model.TableType.{FEATURES, METADATA, TILES, UNKNOWN} diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala similarity index 96% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala index 23e355ad11..af61740eb9 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackagePartitionReaderFactory.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackagePartitionReaderFactory.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.connection.GeoPackageConnectionManager import org.apache.sedona.sql.datasources.geopackage.model.{GeoPackageLoadOptions, PartitionOptions, TableType} diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala similarity index 96% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala index 892385ba11..6a6da90ecf 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScan.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScan.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions import org.apache.spark.sql.SparkSession diff --git a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala similarity index 96% rename from spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala index 2d1b4b1ad9..88f50535b6 100644 --- a/spark/spark-3.5/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageScanBuilder.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageScanBuilder.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions import org.apache.spark.sql.SparkSession diff --git a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala similarity index 97% rename from spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala rename to spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala index e926fd2e2c..b7e101e4a8 100644 --- a/spark/spark-3.4/src/main/scala/org/apache/spark/sql/execution/datasources/geopackage/GeoPackageTable.scala +++ b/spark/spark-3.5/src/main/scala/org/apache/sedona/sql/datasources/geopackage/GeoPackageTable.scala @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.spark.sql.execution.datasources.geopackage +package org.apache.sedona.sql.datasources.geopackage import org.apache.hadoop.fs.FileStatus import org.apache.sedona.sql.datasources.geopackage.model.GeoPackageLoadOptions