title: Athena query get the index of any element in a list
body: <p>I need to access to the elements in a column whose type is list according to the other elements' locations in another list-like column. Say, my dataset is like:</p>
  <pre><code>WITH dataset AS (
    SELECT ARRAY ['hello', 'amazon', 'athena'] AS words,
    ARRAY ['john', 'tom', 'dave'] AS names
  )
  SELECT * FROM dataset
  </code></pre>
  <p>And I'm going to achieve</p>
  <pre><code>SELECT element_at(words, index(names, 'john')) AS john_word
  FROM dataset
  </code></pre>
  <p>Is there a way to have a function in Athena like &quot;index&quot;? Or how can I customize one like this? The desired result should be like:</p>
  <pre><code>| -------- |
  | john_word|
  | -------- |
  | hello    |
  | -------- |
  </code></pre>