title: Reference columns in dataframes throwing ambiguous error when joining two dataframes where one dataframe has an array of reference keys
body: <p>I have two dataframes as follows</p>
  <p>dataframeOne</p>
  <pre><code>+--------------------------------------------
  |______subject_______________|______marks___|
  | Maths                      |    89        |
  | English                    |    90        |
  | Religion                   |    80        |
  ---------------------------------------------
  </code></pre>
  <p>dataframeTwo</p>
  <pre><code>+-------------------------------------------------------------
  |______name__________________|______subject__________________|
  | Liza                       |   [Maths]                     |
  | Inter                      |   [Religion, English]         |
  | Ovin                       |   [Maths, Religion, English]  |
  --------------------------------------------------------------
  </code></pre>
  <p>Expected output</p>
  <pre><code>+-------------------------------------------------------------
  |______name__________________|______marks____________________|
  | Liza                       |   [89]                        |
  | Inter                      |   [80, 90]                    |
  | Religion                   |   [89, 80, 90]                |
  --------------------------------------------------------------
  </code></pre>
  <p>To get the above output I need to join dataframeOne and DataframeTwo. But in dataframeTwo subject Column is having arrays while dataframe one is having a string value. I tried the below code with the error followed by</p>
  <pre><code>val newDataframe = dataframeTwo.withColumn(&quot;myMarks&quot;, struct('marks))
      val studentMarksDataframe = dataframeOne.join(newDataframe, array_contains(subject, subject)).agg(collect_list('myMarks))
  </code></pre>
  <p>Error</p>
  <blockquote>
  <p>Exception in thread &quot;main&quot; org.apache.spark.sql.AnalysisException:
  Reference 'unicode' is ambiguous, could be: subject, subject</p>
  </blockquote>
  <p>How can I solve the above issue?</p>