[
https://issues.apache.org/jira/browse/HIVE-14285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360729#comment-16360729
]
Zoltan Haindrich commented on HIVE-14285:
-----------------------------------------
[~kellyzly] it would probably make sense to change the order...iirc before this
patch the ordering was dependent on the jvm hasmap order...so I would prefer to
have something which has the ordering defined somehow (eg: not HashMap).
q.out-s has these contents in there; and sometimes they are just changing
places; and make comparision problematic...
> Explain outputs: map-entry ordering of non-primitive objects.
> ---------------------------------------------------------------
>
> Key: HIVE-14285
> URL: https://issues.apache.org/jira/browse/HIVE-14285
> Project: Hive
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Minor
> Fix For: 2.3.0
>
> Attachments: HIVE-14285.1.patch
>
>
> In HIVE-12244 I've left behind some ugly backward compatible getters with
> {{@Explain}} decorations to keep the qtests from breaking.
> There were heavy explain plan changes when I used {{Path}} objects as keys in
> {{@Explain}} marked methods.
> I've looked into the causes of this:
> * there is a {{TreeSet}} in there to keep all the keys in order.
> * but: {{org.apache.hadoop.fs.Path}} uses a different sort order (inherited
> from {{java.net.URI}} )...it sorts the paths using
> priorities:[schema,schemeSpecificPart,host,path,query,fragment]
> considering that the output is an explain result(possibly read by humans):
> i don't think this sophisticated sort order can be useful.
> {{ExplainTask#outputMap}} always calls toString() on the keys before using
> them...so the most painless solution would be to change all the keys inside
> the treeset to simple strings (in case it's not a primitive already); this
> would restore the original behaviour for me.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)