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
Fix lint and test compile error after merge
  • Loading branch information
EnricoMi committed Apr 28, 2025
commit 583d3492f65bf0e69f5fbccf73f99449beff5db8
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import org.apache.spark.sql.connector.expressions.{Expression, FieldReference, N
import org.apache.spark.sql.execution.datasources.jdbc.{JDBCOptions, JdbcOptionsInWrite, JdbcUtils}
import org.apache.spark.sql.types.{BooleanType, ByteType, DataType, DecimalType, MetadataBuilder, ShortType, StringType, TimestampType}

private[sql] case class H2Dialect() extends JdbcDialect with MergeByTempTable with NoLegacyJDBCError {
private[sql] case class H2Dialect() extends JdbcDialect with MergeByTempTable
with NoLegacyJDBCError {
override def canHandle(url: String): Boolean =
url.toLowerCase(Locale.ROOT).startsWith("jdbc:h2")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ import org.apache.spark.sql.jdbc.MsSqlServerDialect.{GEOGRAPHY, GEOMETRY}
import org.apache.spark.sql.types._


private case class MsSqlServerDialect() extends JdbcDialect with MergeByTempTable with NoLegacyJDBCError {
private case class MsSqlServerDialect() extends JdbcDialect with MergeByTempTable
with NoLegacyJDBCError {
override def canHandle(url: String): Boolean =
url.toLowerCase(Locale.ROOT).startsWith("jdbc:sqlserver")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class JDBCWriteSuite extends SharedSparkSession with BeforeAndAfter {
}

test("Upsert") {
JdbcDialects.registerDialect(H2Dialect)
JdbcDialects.registerDialect(H2Dialect())
val table = "upsert"
spark
.range(10)
Expand Down