Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - How to check if all key/value pairs in two maps are equal?


Copy link to this message
-
Re: How to check if all key/value pairs in two maps are equal?
Aniket Mokashi 2012-02-02, 18:35
Can you cast it into string and compare?

On Thu, Feb 2, 2012 at 9:18 AM, Sunderlin, Mark
<[EMAIL PROTECTED]>wrote:

>  I am trying to see of two hive maps have the same data in them.  I am
> not looking to see if any single key-value pair in the maps match, I am
> looking to see if ****
>
> **a)    **There is a one to one match between the keys in map1 and the
> keys in map2 ****
>
> **b)   **The matching keys  have the same value in both maps****
>
> ** **
>
> This doesn’t work, but it shows what I want to do:****
>
> ** **
>
> case****
>
>             when map1 = map2****
>
>                         then ‘maps match'****
>
>                         else 'maps do not match'****
>
> end match_result****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ---****
>
> *Mark E. Sunderlin***
>
> *Solutions Architect   **|AOL **Core Data Technologies*
>
> P: 703-256-6935       *|* C: 540-327-6222 *|* AIM: MESunderlin****
>
> 22000 AOL Way,  Dulles, VA  20166****
>
> [image: aol-comp-logo]****
>
> ** **
>

--
"...:::Aniket:::... Quetzalco@tl"