title: pySpark jdbc write error: An error occurred while calling o43.jdbc. : scala.MatchError: null
body: <p>I am trying to write simple spark dataframe to db2 database using pySpark. Dataframe has only one column with double as a data type. </p>
  
  <p>This is the dataframe with only one row and one column:
  <img src="https://i.stack.imgur.com/HIk0r.png" alt="PySpark dataframe"></p>
  
  <p>This is the dataframe schema:
  <img src="https://i.stack.imgur.com/NXKAW.png" alt="PySpark dataframe schema"></p>
  
  <p>When I try to write this dataframe to db2 table with this syntax:</p>
  
  <pre><code>dataframe.write.mode('overwrite').jdbc(url=url, table=source, properties=prop)
  </code></pre>
  
  <p>it creates the table in the database for the first time without any issue, but if I run the code second time, it throws an exception:
  <img src="https://i.stack.imgur.com/329w1.png" alt="Error Log"></p>
  
  <p>On the DB2 side the column datatype is also <code>DOUBLE</code>.</p>
  
  <p>Not sure what am I missing. </p>