Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 138936f

Browse files
Dovi Joelshivsood
authored andcommitted
added profiles for spark24 and spark30 as profiles. This build on changes from dovijoel.
rebaselined with main which is now JDBC 8.4.1 based.
1 parent 9c6fc79 commit 138936f

File tree

5 files changed

+70
-54
lines changed

5 files changed

+70
-54
lines changed

.github/workflows/scala2.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Scala CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 1.8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 1.8
20+
- name: Run tests
21+
run: sbt test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@ MigrationBackup/
352352
project/project/
353353
project/target/
354354
target/
355-
355+
.idea

build.sbt

Lines changed: 0 additions & 32 deletions
This file was deleted.

pom.xml

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@
1313
</organization>
1414
<licenses>
1515
<license>
16-
<name>Apache License 2.0</name>
17-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
16+
<name>MIT License</name>
17+
<url>http://www.opensource.org/licenses/mit-license.php</url>
1818
</license>
1919
</licenses>
20-
<properties>
21-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22-
<scala.binary.version>2.11</scala.binary.version>
23-
<scala.version>2.11.12</scala.version>
24-
<spark.version>2.4.6</spark.version>
25-
</properties>
2620
<dependencies>
2721
<dependency>
2822
<groupId>org.scala-lang</groupId>
@@ -56,23 +50,12 @@
5650
<scope>test</scope>
5751
<classifier>tests</classifier>
5852
</dependency>
59-
<dependency>
60-
<groupId>org.scalatest</groupId>
61-
<artifactId>scalatest_${scala.binary.version}</artifactId>
62-
<version>3.0.5</version>
63-
<scope>test</scope>
64-
</dependency>
6553
<dependency>
6654
<groupId>com.novocode</groupId>
6755
<artifactId>junit-interface</artifactId>
6856
<version>0.11</version>
6957
<scope>test</scope>
7058
</dependency>
71-
<dependency>
72-
<groupId>com.microsoft.sqlserver</groupId>
73-
<artifactId>mssql-jdbc</artifactId>
74-
<version>8.4.1.jre8</version>
75-
</dependency>
7659
</dependencies>
7760
<developers>
7861
<developer>
@@ -213,4 +196,48 @@
213196
</plugin>
214197
</plugins>
215198
</build>
199+
<profiles>
200+
<profile>
201+
<id>spark24</id>
202+
<properties>
203+
<scala.binary.version>2.11</scala.binary.version>
204+
<scala.version>2.11.12</scala.version>
205+
<spark.version>2.4.6</spark.version>
206+
</properties>
207+
<dependencies>
208+
<dependency>
209+
<groupId>org.scalatest</groupId>
210+
<artifactId>scalatest_${scala.binary.version}</artifactId>
211+
<version>3.0.5</version>
212+
<scope>test</scope>
213+
</dependency>
214+
<dependency>
215+
<groupId>com.microsoft.sqlserver</groupId>
216+
<artifactId>mssql-jdbc</artifactId>
217+
<version>8.4.1.jre8</version>
218+
</dependency>
219+
</dependencies>
220+
</profile>
221+
<profile>
222+
<id>spark30</id>
223+
<properties>
224+
<scala.binary.version>2.12</scala.binary.version>
225+
<scala.version>2.12.11</scala.version>
226+
<spark.version>3.0.0</spark.version>
227+
</properties>
228+
<dependencies>
229+
<dependency>
230+
<groupId>org.scalatest</groupId>
231+
<artifactId>scalatest_${scala.binary.version}</artifactId>
232+
<version>3.0.8</version>
233+
<scope>test</scope>
234+
</dependency>
235+
<dependency>
236+
<groupId>com.microsoft.sqlserver</groupId>
237+
<artifactId>mssql-jdbc</artifactId>
238+
<version>8.4.1.jre8</version>
239+
</dependency>
240+
</dependencies>
241+
</profile>
242+
</profiles>
216243
</project>

src/test/scala/com/microsoft/sqlserver/jdbc/spark/bulkwrite/DataSourceTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import java.sql.Connection
1616

1717
import org.scalatest.Matchers
1818
import org.apache.spark.SparkFunSuite
19-
import org.apache.spark.sql.test.SharedSQLContext
19+
import org.apache.spark.sql.test.SharedSparkSession
2020

21-
class DataSourceTest extends SparkFunSuite with Matchers with SharedSQLContext {
21+
class DataSourceTest extends SparkFunSuite with Matchers with SharedSparkSession {
2222

2323
test("Schema validation between Spark DataFrame and SQL Server ResultSet") {}
2424

0 commit comments

Comments
 (0)