[ https://issues.apache.org/jira/browse/SPARK-49739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883635#comment-17883635 ]
Stevo Mitric commented on SPARK-49739: -------------------------------------- [~maxgekk] The affected versions stated in this ticket are not covered by that PR. 3.5.2: [https://github.com/apache/spark/blob/v3.5.2-rc5/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCOptions.scala#L54] We should consider backporting that PR just to be consistent. > NPE from > org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.$anonfun$asProperties$1 > -------------------------------------------------------------------------------------------- > > Key: SPARK-49739 > URL: https://issues.apache.org/jira/browse/SPARK-49739 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.5.2, 3.4.3 > Reporter: Ivan Jevtic > Priority: Minor > Labels: pull-request-available > > NullPointerException occurs in the following stacktrace: > {code:java} > java.lang.NullPointerException > at java.util.Hashtable.put(Hashtable.java:460) > at java.util.Properties.setProperty(Properties.java:166) > at > org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.$anonfun$asProperties$1(JDBCOptions.scala:55) > at scala.collection.immutable.Map$Map2.foreach(Map.scala:273) > at > org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:55) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcOptionsInWrite.<init>(JDBCOptions.scala:258) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcOptionsInWrite.<init>(JDBCOptions.scala:262) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.saveTableToJDBC(JdbcRelationProvider.scala:54) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:101) > at > org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:50) > at > org.apache.spark.sql.execution.command.ExecutedCommandExec.$anonfun$sideEffectResult$2(commands.scala:84) > at > org.apache.spark.sql.execution.SparkPlan.runCommandWithAetherOff(SparkPlan.scala:180) > at > org.apache.spark.sql.execution.SparkPlan.runCommandInAetherOrSpark(SparkPlan.scala:191) > at > org.apache.spark.sql.execution.command.ExecutedCommandExec.$anonfun$sideEffectResult$1(commands.scala:84) > {code} > This occurs because > [here,|https://github.com/apache/spark/blob/branch-3.5/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/SaveIntoDataSourceCommand.scala#L46] > the client sends invalid options, where some value in the map is null. We > should return appropriate error condition here. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org