title: How to sum two columns containing null values in a dataframe in Spark/PySpark?
body: <p>I have a dataframe in following format -</p>
  <pre><code>Col1    |cnt_Test1     |cnt_Test2
  _______________________________________
  Stud1   | null        | 2
  Stud2   | 3           | 4
  Stud3   | 1           | null
  </code></pre>
  <p>I want to create a new column by aggregating cnt_Test1 and cnt_Test2 to get the following result -</p>
  <pre><code>Col1    |cnt_Test1     |cnt_Test2     | new_Count
  ____________________________________________________
  Stud1   | null        | 2              | 2
  Stud2   | 3           | 4              | 7
  Stud3   | 1           | null           | 1
  </code></pre>
  <p>However, I am getting the following output - where sum of a null and long integer is null</p>
  <pre><code>Col1    |cnt_Test1     |cnt_Test2     | new_Count
  ____________________________________________________
  Stud1   | null        | 2              | null
  Stud2   | 3           | 4              | 7
  Stud3   | 1           | null           | null
  </code></pre>