Skip to content

Commit

Permalink
Fix lint and test compile error after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Jan 16, 2025
1 parent 44248d0 commit 5146227
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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

0 comments on commit 5146227

Please sign in to comment.