Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,19 @@ class ClientE2ETestSuite extends RemoteSparkSession with SQLHelper {
session.createDataFrame(list.asScala.toSeq))
}

test("write jdbc2") {
val rows = java.util.Arrays.asList[Row](Row("dave", 42), Row("mary", 222))
val schema = StructType(
StructField("name", StringType) ::
StructField("id", IntegerType) :: Nil)
val df = spark.createDataFrame(rows, schema)
df.write.jdbc("jdbc:h2:mem:testdb2", "BASICCREATETEST", new Properties())

checkSameResult(
rows.asScala.map(row => Row(row.getString(0), row.getInt(1))),
spark.read.jdbc("jdbc:h2:mem:testdb2", "BASICCREATETEST", new Properties()))
}

test("SparkSession newSession") {
val oldId = spark.sql("SELECT 1").analyze.getSessionId
val newId = spark.newSession().sql("SELECT 1").analyze.getSessionId
Expand Down
11 changes: 5 additions & 6 deletions connector/connect/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@
<artifactId>grpc-stub</artifactId>
<version>${io.grpc.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
Expand Down Expand Up @@ -215,12 +220,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
Expand Down