GitHub user skambha opened a pull request:

    https://github.com/apache/spark/pull/15649

    [SPARK-18121][SQL] Unable to query global temp views when hive support is 
enabled

    ## What changes were proposed in this pull request?
    
    Issue: 
    Querying on a global temp view throws Table or view not found exception. 
    
    Fix:
    Update the lookupRelation in HiveSessionCatalog to check for global temp 
views similar to the SessionCatalog.lookupRelation.
    
    Before fix: 
    Querying on a global temp view ( for. e.g.:  select * from global_temp.v1)  
throws Table or view not found exception
    
    After fix: 
    Query succeeds and returns the right result. 
    
    ## How was this patch tested?
    - Two unit tests are added to check for global temp view for the code path 
when hive support is enabled.
    - Regression unit tests were run successfully. ( build/sbt -Phive 
hive/test, build/sbt sql/test, build/sbt catalyst/test)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/skambha/spark lookuprelationChanges

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15649.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15649
    
----
commit 95312dd16c0d5b70996fcdc3a49bcdab29fd99d2
Author: Sunitha Kambhampati <skam...@us.ibm.com>
Date:   2016-10-26T20:11:56Z

    Add check for global temp tables in HiveSessionCatalog lookupRelation

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to