File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,8 @@ object JdbcUtils extends Logging {
273273 val rsmd = resultSet.getMetaData
274274 val ncols = rsmd.getColumnCount
275275 val fields = new Array [StructField ](ncols)
276- // if true, spark will propagate null to underlying DB engine instead of using type default value
276+ // if true, spark will propagate null to underlying
277+ // DB engine instead of using type default value
277278 val alwaysNullable = true
278279
279280 var i = 0
@@ -293,7 +294,11 @@ object JdbcUtils extends Logging {
293294 rsmd.getClass.getName == " org.apache.hive.jdbc.HiveResultSetMetaData" => true
294295 }
295296 }
296- val nullable = if (alwaysNullable) alwaysNullable else rsmd.isNullable(i + 1 ) != ResultSetMetaData .columnNoNulls
297+ val nullable =
298+ if (alwaysNullable)
299+ alwaysNullable
300+ else
301+ rsmd.isNullable(i + 1 ) != ResultSetMetaData .columnNoNulls
297302 val metadata = new MetadataBuilder ()
298303 .putString(" name" , columnName)
299304 .putLong(" scale" , fieldScale)
You can’t perform that action at this time.
0 commit comments