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

Peter Vary commented on HIVE-16643:
-----------------------------------

[~ychena]: Thanks for taking the time to check!
Sorting the input and output list by {{sortInputOutput}} has to be done when 
every input/output is reverted to the final version, so this should be the last 
step. So when I wrote the code first it was like:
{code}
[..]
    if (rewriteSourceTables) {
      rawOutput = revertReplaceTableNames(rawOutput);
    }
    String filteredOutput = 
staticFilterSet.filter(specificFilterSet.filter(rawOutput));
    if (rewriteSourceTables) {
      rawOutput = sortInputOutput(rawOutput);
    }
[..]
{code}

And I decided it would be better to use only 1 "if", and by the way the 
filtersets are removing big chunks of text, so we might be a little faster too.

Thanks,
Peter

> BeeLine tests output should keep the PREHOOK/POSTHOOK Input/Output orderdering
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-16643
>                 URL: https://issues.apache.org/jira/browse/HIVE-16643
>             Project: Hive
>          Issue Type: New Feature
>          Components: Testing Infrastructure
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>         Attachments: HIVE-16643.01.patch, HIVE-16643.patch
>
>
> The {{PreExecutePrinter}} and the {{PostExecutePrinter}} prints the query 
> input and the output list in alphabetical order in {{printEntities}} method.
> Our goal is to have the same output from the BeeLine query tests, and the Cli 
> query tests. Since the BeeLine tests are using test specific databases to run 
> the tests, and only converting the results in the end to remove this specific 
> database names from the output, we have to reorder the lists after this 
> conversion.
> Raw BeeLine output:
> {code}
> [..]
> INFO  : PREHOOK: Output: create_merge_compressed@src_rc_merge_test
> INFO  : PREHOOK: Output: database:create_merge_compressed
> [..]
> {code}
> Before patch BeeLine output:
> {code}
> [..]
> PREHOOK: Output: default@src_rc_merge_test
> PREHOOK: Output: database:default
> [..]
> {code}
> Expected output:
> {code}
> [..]
> PREHOOK: Output: database:default
> PREHOOK: Output: default@src_rc_merge_test
> [..]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to