title: Hive Conditional logic if or case
body: <p>I have the following conditional statement i am trying to convert into hive</p>
  
  <pre><code>if [my_time] &gt; [your_time] then [my_time]
  elseif isNull ([your_time])
  then [my_time]
  else null()
  endif
  </code></pre>
  
  <p>Also my_time and your_time are in timestamp formats. I have tried the following below in hive but it doesn't seem to be correct as some expected results are missing</p>
  
  <pre><code>case when (my_time &gt; your_time) then my_time
       when (your_time = Null) then my_time
  end as overall_time
  </code></pre>
  
  <p>How can i fix my logic in the second statement above.</p>