GitHub user khalidhuseynov opened a pull request:

    https://github.com/apache/zeppelin/pull/3073

    [zeppelin-3625] [branch-0.8] Pandasql interpreter fails to query over 
python dataframe

    ### What is this PR for?
    fix pandasql query over dataframe for `branch-0.8`. the reason in this 
branch seems to be different from `master`.  first of all there's NPE with 
python context being used from pandas without being initialised. after fixing 
it there's another problem with `_displayhook`.
    
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    * [x] - fix npe
    * [x] - fix `_displayhook`
    * [ ] - test
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-3625
    
    ### How should this be tested?
    explained in the issue
    
    ### Screenshots (if appropriate)
    original NPE different from `master`:
    <img width="1232" alt="screen shot 2018-07-15 at 7 26 39 pm" 
src="https://user-images.githubusercontent.com/1642088/42735603-f01172a0-8891-11e8-87a5-8b359209b889.png";>
    
    after fixing npe, issue with `_displayhook`:
    <img width="1271" alt="screen shot 2018-07-15 at 7 32 54 pm" 
src="https://user-images.githubusercontent.com/1642088/42735612-1bc13a34-8892-11e8-9379-af56c46a2ecb.png";>
    and interpreter logs show 
    <img width="884" alt="screen shot 2018-07-15 at 7 33 47 pm" 
src="https://user-images.githubusercontent.com/1642088/42735615-3563e108-8892-11e8-979a-73d9fcf28c0a.png";>
    
    at this point not sure why can't execute `__zeppelin__._displayhook()` in 
ipython kernel and not sure what's the purpose of this command on 
pandasql->interpret. removing this command resolves issue as below. opinions on 
this are appreciated in case there're better options 
    <img width="1270" alt="screen shot 2018-07-15 at 7 37 01 pm" 
src="https://user-images.githubusercontent.com/1642088/42735636-d83db566-8892-11e8-92fc-383957cbcee1.png";>
    
    
    
    ### Questions:
    * Does the licenses files need update?
    * Is there breaking changes for older versions?
    * Does this needs documentation?


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

    $ git pull https://github.com/khalidhuseynov/zeppelin fix-0.8/ZEPPELIN-3625

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

    https://github.com/apache/zeppelin/pull/3073.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 #3073
    
----
commit af11abd1ba5b85ba795005d3cde4caa4fb9b8695
Author: Khalid Huseynov <khalidhnv@...>
Date:   2018-07-15T06:14:05Z

    fix npe

commit bce568971c48c5efb13b792d8d78483a9d04f08e
Author: Khalid Huseynov <khalidhnv@...>
Date:   2018-07-15T06:16:00Z

    remove _displayhook from pandasql interpret

----


---

Reply via email to