title: How to find if one column is contained in another array column in pyspark
body: <p>I have 2 columns with the following schema in a pyspark dataframe</p>
  
  <pre><code>('pattern', 'array&lt;struct&lt;pattern:string,positions:array&lt;int&gt;&gt;&gt;')
  
  ('distinct_patterns', 'array&lt;array&lt;struct&lt;pattern:string,positions:array&lt;int&gt;&gt;&gt;&gt;')
  </code></pre>
  
  <p>I want to find those rows where pattern is there in distinct patterns</p>