title: find values closest to a list of values in pyspark
body: <p>Let's suppose to have this Pyspark dataframe:</p>
  <pre><code>x = np.random.randint(1, 100, 1000)
  y = np.random.randint(1, 100, 1000)
  z = np.random.randint(1, 100, 1000)
  
  df = pd.DataFrame({'x': x, 'y': y, 'z': z})
  spark_df = spark.createDataFrame(df)
  </code></pre>
  <p>Let's suppose to have this list of values:</p>
  <pre><code>lst = [10, 20, 30]
  </code></pre>
  <p>I would like to retrieve all the <strong>3</strong> (=<code>len(lst)</code>) rows of spark_df such that the difference between each value of <code>lst</code> and <code>spark_df.x</code> is the lowest. I would like to retrieve this three values as a spark dataframe. E.g:</p>
  <pre><code>+---+---+---+
  |  x|  y|  z|
  +---+---+---+
  | 11| 32| 84|
  | 22| 12| 38|
  | 29| 14| 12|
  +---+---+---+
  </code></pre>
  <p>In this case:</p>
  <ul>
  <li><code>11</code> is the closest <code>spark_df.x</code> value to <code>10</code></li>
  <li><code>22</code> is the closest <code>spark_df.x</code> value to <code>20</code></li>
  <li><code>29</code> is the closest <code>spark_df.x</code> value to <code>30</code></li>
  </ul>
  <p>How can achieve this result in Pyspark 3+?</p>
  <p>Note: this is only a toy example and the list of values could be in the order of thousands.</p>