title: Anyway to UNION 3 columns with 2 in Spark SQL
body: <pre><code>spark.sql(&quot;&quot;&quot;(SELECT DISTINCT game_id,winner as player_name from chess_wc_history_game_info WHERE winner!='draw' GROUP BY game_id,event,winner)
      UNION
      ((SELECT game_id, player as player_name FROM chess_wc_history_moves WHERE black_queen_count=0 AND color='Black')
      UNION
      (SELECT game_id, player as player_name FROM chess_wc_history_moves WHERE white_queen_count=0 AND color='White'))&quot;&quot;&quot;).show()
  </code></pre>
  <p>This outputs:</p>
  <pre><code>|             game_id|         player_name|
  | -------------------|--------------------|
  |61b784cc-cdab-496...|        Morozevich,A|
  |39a6b655-19d8-419...|     Karpov, Anatoly|
  |a744139e-aff8-4d3...|         Tal, Mihail|
  |e945781f-92a2-4fb...|        Sargissian,G|
  |f9307e55-3eff-477...|            Adams,Mi|
  |0230130d-ee51-4f9...|     Barua, Dibyendu|
  |3d34d86e-216e-41f...|    Tiviakov, Sergei|
  </code></pre>
  <p>Expected Output:</p>
  <pre><code>|             game_id|         player_name|event          |
  | -------------------|--------------------|---------------|
  |61b784cc-cdab-496...|        Morozevich,A|  Event names  |
  |39a6b655-19d8-419...|     Karpov, Anatoly|               |
  |a744139e-aff8-4d3...|         Tal, Mihail|               |
  |e945781f-92a2-4fb...|        Sargissian,G|               |
  |f9307e55-3eff-477...|            Adams,Mi|               |
  </code></pre>
  <p>Whereas adding the event column which is contained inside the <code>chess_wc_history_game_info</code> table makes the query invalid saying UNION can only be performed on two columns whereas first one has 3 columns and second has 2 columns, is there anyway  I can SELECT all 3 at once without changing the results? (game_id,event,winner)</p>