title: Hive: How to test and find for null map entries?
body: <p>If using the map type in a Hive table, how can I test for a null entry (key exists, but value is null)?</p>
  
  <p>With table:</p>
  
  <pre><code> test1 (id string, m map&lt;string, string&gt;)
  </code></pre>
  
  <p>I have a few entries that look like this:</p>
  
  <pre><code>id1 {"b":"B","c":null} 
  id2 {"b":"B"}
  </code></pre>
  
  <p>If I run the query:</p>
  
  <blockquote>
    <p>select * from test1 where m["c"] is null;</p>
  </blockquote>
  
  <p>I will get both rows back since expression evaluates true each time.</p>
  
  <p>How can I test between key exists and value is null?</p>