-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bd1df6
commit 1acc7e8
Showing
23 changed files
with
599 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.google.cloud.spark</groupId> | ||
<artifactId>spark-bigquery-dsv2-parent</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>../spark-bigquery-dsv2-parent</relativePath> | ||
</parent> | ||
|
||
<artifactId>spark-3.5-bigquery-lib</artifactId> | ||
<version>${revision}</version> | ||
<name>Connector code for BigQuery DataSource v2 for Spark 3.5</name> | ||
<properties> | ||
<spark.version>3.5.0</spark.version> | ||
<scala.binary.version>2.13</scala.binary.version> | ||
<shade.skip>true</shade.skip> | ||
</properties> | ||
<licenses> | ||
<license> | ||
<name>Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>spark-3.4-bigquery-lib</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.spark</groupId> | ||
<artifactId>spark-avro_2.13</artifactId> | ||
<version>${spark.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
...ry-lib/src/main/java/com/google/cloud/spark/bigquery/v2/Spark35BigQueryTableProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.cloud.spark.bigquery.v2; | ||
|
||
import java.util.Map; | ||
import org.apache.spark.sql.connector.catalog.Table; | ||
import org.apache.spark.sql.connector.expressions.Transform; | ||
import org.apache.spark.sql.types.StructType; | ||
|
||
public class Spark35BigQueryTableProvider extends Spark34BigQueryTableProvider { | ||
// empty | ||
@Override | ||
public Table getTable( | ||
StructType schema, Transform[] partitioning, Map<String, String> properties) { | ||
return Spark3Util.createBigQueryTableInstance(Spark33BigQueryTable::new, schema, properties); | ||
} | ||
|
||
@Override | ||
protected Table getBigQueryTableInternal(Map<String, String> properties) { | ||
return Spark3Util.createBigQueryTableInstance(Spark33BigQueryTable::new, null, properties); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ry-lib/src/main/resources/META-INF/services/com.google.cloud.spark.bigquery.TypeConverter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.google.cloud.spark.bigquery.v2.TimestampNTZTypeConverter |
1 change: 1 addition & 0 deletions
1
...-lib/src/test/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.google.cloud.spark.bigquery.v2.Spark35BigQueryTableProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.google.cloud.spark</groupId> | ||
<artifactId>spark-bigquery-dsv2-parent</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>../spark-bigquery-dsv2-parent</relativePath> | ||
</parent> | ||
|
||
<artifactId>spark-3.5-bigquery</artifactId> | ||
<version>${revision}</version> | ||
<name>BigQuery DataSource v2 for Spark 3.5</name> | ||
<properties> | ||
<spark.version>3.5.0</spark.version> | ||
<shade.skip>false</shade.skip> | ||
</properties> | ||
<licenses> | ||
<license> | ||
<name>Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>spark-3.5-bigquery-lib</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.spark</groupId> | ||
<artifactId>spark-avro_2.12</artifactId> | ||
<version>${spark.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>spark-3.3-bigquery-pushdown_2.12 | ||
</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>spark-3.3-bigquery-pushdown_2.13 | ||
</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
1 change: 1 addition & 0 deletions
1
...-bigquery-dsv2/spark-3.5-bigquery/src/build/resources/spark-bigquery-connector.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.version=${project.version} |
1 change: 1 addition & 0 deletions
1
...uery/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.google.cloud.spark.bigquery.v2.Spark35BigQueryTableProvider |
30 changes: 30 additions & 0 deletions
30
...le/cloud/spark/bigquery/acceptance/Spark35BigNumericDataprocServerlessAcceptanceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.cloud.spark.bigquery.acceptance; | ||
|
||
import org.junit.Ignore; | ||
|
||
@Ignore // Waiting for the serverless dataproc.sparkBqConnector.uri property | ||
public class Spark35BigNumericDataprocServerlessAcceptanceTest | ||
extends BigNumericDataprocServerlessAcceptanceTestBase { | ||
|
||
public Spark35BigNumericDataprocServerlessAcceptanceTest() { | ||
super("spark-3.5-bigquery", "2.1"); | ||
} | ||
|
||
// tests from superclass | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...oud/spark/bigquery/acceptance/Spark35ReadSheakspeareDataprocServerlessAcceptanceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.cloud.spark.bigquery.acceptance; | ||
|
||
import org.junit.Ignore; | ||
|
||
@Ignore // Waiting for the serverless dataproc.sparkBqConnector.uri property | ||
public class Spark35ReadSheakspeareDataprocServerlessAcceptanceTest | ||
extends ReadSheakspeareDataprocServerlessAcceptanceTestBase { | ||
|
||
public Spark35ReadSheakspeareDataprocServerlessAcceptanceTest() { | ||
super("spark-3.5-bigquery", "2.1"); | ||
} | ||
|
||
// tests from superclass | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...e/cloud/spark/bigquery/acceptance/Spark35WriteStreamDataprocServerlessAcceptanceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.cloud.spark.bigquery.acceptance; | ||
|
||
import org.junit.Ignore; | ||
|
||
@Ignore // spark-3.5-bigquery does not support streaming yet | ||
public class Spark35WriteStreamDataprocServerlessAcceptanceTest | ||
extends WriteStreamDataprocServerlessAcceptanceTestBase { | ||
|
||
public Spark35WriteStreamDataprocServerlessAcceptanceTest() { | ||
super("spark-3.5-bigquery", "2.1"); | ||
} | ||
|
||
// tests from superclass | ||
|
||
} |
Oops, something went wrong.