Skip to content

Commit a984f3b

Browse files
committed
Improve custom schema.
1 parent ffaee42 commit a984f3b

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ object JDBCRDD extends Logging {
8282
* @return A Catalyst schema corresponding to columns in the given order.
8383
*/
8484
private def pruneSchema(schema: StructType, columns: Array[String]): StructType = {
85-
val fieldMap = Map(schema.fields.map(x => x.name -> x): _*)
86-
new StructType(columns.map(name => fieldMap(name)))
85+
val fieldMap = Map(schema.fields.map(x => x.name -> x): _*)
86+
new StructType(columns.map(name => fieldMap(name)))
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)