-
- Downloads
[SPARK-14536][SQL][BACKPORT-2.1] fix to handle null value in array type column for postgres.
## What changes were proposed in this pull request? JDBC read is failing with NPE due to missing null value check for array data type if the source table has null values in the array type column. For null values Resultset.getArray() returns null. This PR adds null safe check to the Resultset.getArray() value before invoking method on the Array object ## How was this patch tested? Updated the PostgresIntegration test suite to test null values. Ran docker integration tests on my laptop. Author: sureshthalamati <suresh.thalamati@gmail.com> Closes #17460 from sureshthalamati/jdbc_array_null_fix_spark_2.1-SPARK-14536.
Showing
- external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala 10 additions, 2 deletions.../org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala 3 additions, 3 deletions...ache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
Please register or sign in to comment