[ 
https://issues.apache.org/jira/browse/HIVE-4858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713952#comment-13713952
 ] 

Xuefu Zhang commented on HIVE-4858:
-----------------------------------

[~ashutoshc] I didn't know about HIVE-3775, but it seems a good way to solve 
random order problem for testing purpose. However, do you think also it's a 
good idea to have a deterministic ordering for SQL outputs? For instance, it 
might seems more usable with an ordered output if user does a "show tables", 
etc.

Having a deterministic ordering in sql output is another motivation of this 
JIRA, though it only takes care of "show grants". Hive is a little inconsistent 
in this. I think "show databases" and "show tables" diffs in this behavior.
                
> Sort "show grant" result to improve usability and testability
> -------------------------------------------------------------
>
>                 Key: HIVE-4858
>                 URL: https://issues.apache.org/jira/browse/HIVE-4858
>             Project: Hive
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 0.10.0, 0.11.0
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>            Priority: Minor
>             Fix For: 0.11.1
>
>         Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to