Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix after rebase master
  • Loading branch information
EnricoMi committed Apr 28, 2025
commit 18b1ee0a33f0d23f4d3c44a36355897d9e48d6ef
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import scala.jdk.CollectionConverters._

import org.apache.commons.io.FileUtils
import org.apache.commons.io.output.TeeOutputStream
import org.apache.commons.lang3.{JavaVersion, SystemUtils}
import org.scalactic.TolerantNumerics
import org.scalatest.PrivateMethodTester

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package org.apache.spark.sql.jdbc

import org.apache.spark.sql.types.StructField

import java.sql.Statement
import java.util.UUID

import org.apache.spark.sql.types.StructField


trait MergeByTempTable {
self: JdbcDialect =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private case class OracleDialect()
override def getMergeQuery(
sourceTableName: String,
destinationTableName: String,
columns: Array[String],
columns: Array[StructField],
keyColumns: Array[String]): String = {
// Oracle dialect does not like a few bits of the standard SQL MERGE command
super.getMergeQuery(sourceTableName, destinationTableName, columns, keyColumns)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,12 @@ class JDBCSuite extends QueryTest with SharedSparkSession {
}

test("MergeByTempTable: MERGE table into table") {
val columns = Array("id", "ts", "v1", "v2")
.map(testMergeByTempTableDialect.quoteIdentifier)
val columns = Array(
StructField("id", LongType),
StructField("ts", TimestampType),
StructField("v1", StringType),
StructField("v2", IntegerType)
)
val keyColumns = Array("id", "ts")
val sql = testMergeByTempTableDialect.getMergeQuery(
"source", "destination", columns, keyColumns)
Expand Down