Skip to content

Commit eb9571b

Browse files
committed
Fix JDBC+Oservation test
1 parent 8e6106e commit eb9571b

File tree

1 file changed

+5
-6
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc

1 file changed

+5
-6
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,9 +1065,8 @@ object JdbcUtils extends Logging with SQLConfHelper {
10651065
case Some(n) if n < df.rdd.getNumPartitions => df.coalesce(n)
10661066
case _ => df
10671067
}
1068-
repartitionedDF.rdd.foreachPartition { iterator =>
1069-
savePartition(None, iterator, rddSchema, insertStmt, batchSize, dialect,
1070-
isolationLevel, options)
1068+
repartitionedDF.foreachPartition { iterator: Iterator[Row] => savePartition(
1069+
None, iterator, rddSchema, insertStmt, batchSize, dialect, isolationLevel, options)
10711070
}
10721071
}
10731072

@@ -1105,9 +1104,9 @@ object JdbcUtils extends Logging with SQLConfHelper {
11051104
case Some(n) if n < df.rdd.getNumPartitions => df.coalesce(n)
11061105
case _ => df
11071106
}
1108-
repartitionedDF.rdd.foreachPartition { iterator => upsertPartition(
1109-
table, iterator, rddSchema, tableSchema, isCaseSensitive, batchSize,
1110-
dialectWithMerge, isolationLevel, options)
1107+
repartitionedDF.foreachPartition { iterator: Iterator[Row] => upsertPartition(
1108+
table, iterator, rddSchema, tableSchema, isCaseSensitive, batchSize, dialectWithMerge,
1109+
isolationLevel, options)
11111110
}
11121111
}
11131112

0 commit comments

Comments
 (0)