Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/10541#issuecomment-168190691
  
    When running any test suite that extends `HiveComparisonTest`, detail logs 
can be found in `sql/hive/target/unit-tests.log`.  If a query string is 
convertible, we may see something like this (the triple-braces are added so 
that Vim recognizes them as fold marks.):
    
    ```
    ### Running SQL generation round-trip test {{{
    Project [key#357,value#358,ds#356]
    +- MetastoreRelation default, add_part_test, None
    
    Original SQL:
    select * from add_part_test
    
    Generated SQL:
    SELECT `add_part_test`.`key`, `add_part_test`.`value`, `add_part_test`.`ds` 
FROM `default`.`add_part_test`
    }}}
    ```
    
    Otherwise, we may see something like this:
    
    ```
    ### Cannot convert the following logical plan back to SQL {{{
    Aggregate 
[(sum(cast(HiveGenericUDF#org.apache.hadoop.hive.ql.udf.generic.GenericUDFHash(key#2853,value#2854)
 as bigint)),mode=Complete,isDistinct=false) AS _c0#2855L]
    +- MetastoreRelation default, dest_j1, None
    
    Original SQL:
    SELECT sum(hash(dest_j1.key,dest_j1.value)) FROM dest_j1
    }}}
    ```
    
    In this way we can figure out the percentage of convertible query plans. 
Ideally the percentage should be calculated automatically.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to