You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Krishna Kumar (JIRA)" <ji...@apache.org> on 2011/06/09 11:11:58 UTC
[jira] [Created] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
---------------------------------------------------------------------------------------------------------------------------------
Key: HIVE-2209
URL: https://issues.apache.org/jira/browse/HIVE-2209
Project: Hive
Issue Type: Sub-task
Reporter: Krishna Kumar
Assignee: Krishna Kumar
Priority: Minor
Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
- a simple map comparer which assumes keys of the first map can be used to fetch values from the second
- a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
He Yongqiang updated HIVE-2209:
-------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed, thanks Krishna Kumar!
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049297#comment-13049297 ]
Krishna Kumar commented on HIVE-2209:
-------------------------------------
He Yongqiang,
Can you take a look at this one? Once this is in, I can upload the remainder of the patch to HIVE-956.
Thanks.
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068838#comment-13068838 ]
Hudson commented on HIVE-2209:
------------------------------
Integrated in Hive-trunk-h0.21 #838 (See [https://builds.apache.org/job/Hive-trunk-h0.21/838/])
HIVE-2209:add support for map comparision in serde layer (Krishna Kumar via He Yongqiang)
heyongqiang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1149027
Files :
* /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestCrossMapEqualComparer.java
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
* /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestSimpleMapEqualComparer.java
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SimpleMapEqualComparer.java
* /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestFullMapEqualComparer.java
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MapEqualComparer.java
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/FullMapEqualComparer.java
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/CrossMapEqualComparer.java
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar updated HIVE-2209:
--------------------------------
Attachment: HIVE-2209v0.patch
Patch, with tests, added.
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar updated HIVE-2209:
--------------------------------
Issue Type: Improvement (was: Sub-task)
Parent: (was: HIVE-956)
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carl Steinbach updated HIVE-2209:
---------------------------------
Component/s: Serializers/Deserializers
Fix Version/s: 0.8.0
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Components: Serializers/Deserializers
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Fix For: 0.8.0
>
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068128#comment-13068128 ]
jiraposter@reviews.apache.org commented on HIVE-2209:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/879/
-----------------------------------------------------------
(Updated 2011-07-20 02:25:36.169590)
Review request for hive and Yongqiang He.
Summary
-------
Patch for HIVE-2209
This addresses bug HIVE-2209.
https://issues.apache.org/jira/browse/HIVE-2209
Diffs
-----
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/CrossMapEqualComparer.java PRE-CREATION
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/FullMapEqualComparer.java PRE-CREATION
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/MapEqualComparer.java PRE-CREATION
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java 2b77072
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/SimpleMapEqualComparer.java PRE-CREATION
serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestCrossMapEqualComparer.java PRE-CREATION
serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestFullMapEqualComparer.java PRE-CREATION
serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestSimpleMapEqualComparer.java PRE-CREATION
Diff: https://reviews.apache.org/r/879/diff
Testing
-------
Tests added
Thanks,
Krishna
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar updated HIVE-2209:
--------------------------------
Status: Patch Available (was: Open)
For review by He Yongqiang
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068540#comment-13068540 ]
He Yongqiang commented on HIVE-2209:
------------------------------------
+1, will commit after tests pass.
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar updated HIVE-2209:
--------------------------------
Attachment: HIVE-2209v2.patch
Fixed a lowercase/uppercase typo in the test classes
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "Krishna Kumar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar updated HIVE-2209:
--------------------------------
Attachment: HIVE2209v1.patch
Added another implementation with sorting of the keys
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2209) Provide a way by which
ObjectInspectorUtils.compare can be extended by the caller for comparing
maps which are part of the object
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067937#comment-13067937 ]
He Yongqiang commented on HIVE-2209:
------------------------------------
sorry, did not see this issue. can you post a review board request?
(in future, it is better to send a review board request and cc the reviewer. otherwise the reviewer may not notice the jira for some time)
> Provide a way by which ObjectInspectorUtils.compare can be extended by the caller for comparing maps which are part of the object
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-2209
> URL: https://issues.apache.org/jira/browse/HIVE-2209
> Project: Hive
> Issue Type: Improvement
> Reporter: Krishna Kumar
> Assignee: Krishna Kumar
> Priority: Minor
> Attachments: HIVE-2209v0.patch, HIVE-2209v2.patch, HIVE2209v1.patch
>
>
> Now ObjectInspectorUtils.compare throws an exception if a map is contained (recursively) within the objects being compared. Two obvious implementations are
> - a simple map comparer which assumes keys of the first map can be used to fetch values from the second
> - a 'cross-product' comparer which compares every pair of key-value pairs in the two maps, and calls a match if and only if all pairs are matched
> Note that it would be difficult to provide a transitive greater-than/less-than indication with maps so that is not in scope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira