title: Presto - How can i filter array values that are occurring consecutively
body: <p>I want to filter out the values from an array that are occurring consecutively.</p>
  
  <p>I tried using the "array_distinct" &amp; "transform" function in presto, but couldn't progress. As array_distinct only gives distinct values not what i expect</p>
  
  <pre><code>Input : [1,2,2,3,4,4,4,2]
  </code></pre>
  
  <p>Expected Output : [1,2,3,4,2]</p>