You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by tzolov <gi...@git.apache.org> on 2015/08/06 09:37:58 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

GitHub user tzolov opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/181

    ZEPPELIN-141: Show only the Interpreters suggestions. Move the 'local…

    …' suggestions to the bottom of the list


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

    $ git pull https://github.com/tzolov/incubator-zeppelin ZEPPELIN-141

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

    https://github.com/apache/incubator-zeppelin/pull/181.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 #181
    
----
commit a44e2c0a79c803bf6f45f0458210142566d7d45a
Author: tzolov <ch...@gmail.com>
Date:   2015-08-06T07:36:47Z

    ZEPPELIN-141: Show only the Interpreters suggestions. Move the 'local' suggestions to the bottom of the list

----


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129217994
  
    This way I think the problem with https://issues.apache.org/jira/browse/ZEPPELIN-188 will be fixed.


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129305944
  
    @felixcheung, thanks for the suggestion. i've thought of ZEPPELIN-188 as well. Indeed the dirty page event is a good trigger but i am worried of the performance impact. Perhaps it is neglectable, also we can improve the set logic to SET-ONLY-IF-DIFFERENT. 
    
    But let us first merge the current fix. This will resolve ZEPPELIN-141 and fix the broken autocompletion. Then we can generalize the solution (the way you have suggested) in the context of ZEPPELIN-188. What do you think?
    
    I agree about the extensible interpreters. IMHO this will require extending the Interpreter interface, may be extend the websocket protocol with an additional command and figuring out how to enable the ACE  features in the front-end. For example now only few ACE modes are defined in the bower.json. If you need more (like SH or PYTHON for example) one have to add them to bower.json and re-build. Maybe we can (pre)enable large set of the ACE modes upfront. 
    Anyway i think this work deserves its one JIRA ticket (e.g. this would be the 3rd step)?


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129046754
  
    @Leemoonsoo thanks for reviewing this. Not seeing the completions for the current Spark completion implementation was expected (due to [ZEPPELIN-204](https://issues.apache.org/jira/browse/ZEPPELIN-204) ). My solution though was far too restrictive because it use to exclude the default ACE completers leaving in only the Interpreter completers. Although this seemed to work for my PSQL and OQL completers (not committed yet) it was affecting all other interpreters that have not implemented completers. 
    So i added few improvements that hopefully solve the problem with less drawbacks. Here are the additions: 
    
    1. I've (re)included the default ACE completers: `keyWordCompleter`, `snippetCompleter`, `textCompleter`. But i've inserted them after the interpreter completer. That means that the interpreter completions (if provided) will be shown before the Keyword and Local completions (note that the snippet completion is disabled).
    2. The main issue of showing Spark completion results in the SQL paragraphs was due to the incorrectly set paragraph Mode. The old paragraph.controller.js implementation use to set the mode one - during paragraph's initialization and never changed it. Even if the interpreter marker was changed from %spark to %sql the mode would remain Spark and the completion will show the Spark keywords. Furthermore the insertion of new paragraph is initialized with the default (spark) mode and the only way to update it is to update the page (F5). 
    To resolve this i've factored out the mode setting functionality into a separate function: `setParagraphMode`. Now this function is called in two places. Once during the initialization (as it use to be) but now it is called also on (Ctrl+.) attempt.  In this way the editor mode will be corrected before the completion request. The correct mode will be set and in turn the correct completer will be called. 
    3. I've fixed a nasty CSS bug in ACE that was hiding the selected item in the completion popup menu.  
    
    Above improvements are committed and waiting to be reviewed :)
    
     


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129078732
  
    @tzolov Thanks for the update and good explanation.
    Looks good to me!


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129335377
  
    thanks @felixcheung 


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129333354
  
    FYI: created https://issues.apache.org/jira/browse/ZEPPELIN-214


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129217864
  
    For 2, instead of getCompletions, should we call setParagraphMode when the editor is dirty?


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-zeppelin/pull/181


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129218215
  
    I think we need to make that extensible from the interpreters, that way it could support other modes like Python.
    Maybe a follow up PR.



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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-128912228
  
    Tried this branch. but can not see completion list popup in my browser (chrome) when i press `ctrl-.`


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

[GitHub] incubator-zeppelin pull request: ZEPPELIN-141: Show only the Inter...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/181#issuecomment-129332248
  
    Agreed, 2 follow up PR/JIRAs


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