title: Update a pyspark Delta Table using a python boolean function
body: <p>so I have a delta table that I want to update based on a condition of two column values <em>combined;</em></p>
  <p>i.e.</p>
  <pre><code>delta_table.update(
      condition=is_eligible(col(&quot;name&quot;), col(&quot;age&quot;))
      set={&quot;pension_eligible&quot;: lit(&quot;yes&quot;)}
  )
  </code></pre>
  <p>I'm aware that I can do something similar to:</p>
  <pre><code>delta_table.update(
      condition=(col(&quot;name&quot;) == &quot;Einar&quot;) &amp; (col(&quot;age&quot;) &gt; 65)
      set={&quot;pension_eligible&quot;: lit(&quot;yes&quot;)}
  )
  </code></pre>
  <p>But since my logic for computing this is quite complex (I need to look up the name in a database) I would like to define my own Python function for computing this (is_eligible(...)). Other reasons are because this function is used elsewhere and I would like to minimize code duplication.</p>
  <p>Is this possible at all? As I understand you could define it as an UDF, but they only take one parameter and I need at least two. I can not find anything about more complex conditions in the delta lake documentation, so I'd really appreciate some guidance here.</p>