GitHub user sotnich opened a pull request: https://github.com/apache/zeppelin/pull/1886
[ZEPPELIN-1876] improved comptetion with schema/table/column separati⦠â¦on + sqlcompleter tests ### What is this PR for? This PR changes autocompletion behaviour in jdbc interpeter. There are some changes: * [main change] autocompletion now depends on what are you typing. Now there are four types of competion: schema, table, column and keywords. If you typing new word then autocompetion suggests only keywords and schema names. If you are typing after schema name with point then you get list of tables in that schema. Also if you typing a name after point after a table name you will get a list of column names of this table. * autocomption now supports aliases in sql. If you write alias for a table in sql you will get a list of columns for an aliased table if you write down alias and point. * autocompletion now load keywords only in low case (otherwise there are so many keywords in a list of autocompletion that it is becomes uncomfortable) ### What type of PR is it? Improvement ### Todos * [ ] - sort names in the output of autocompletion * [ ] - list only schema names if we are typing a schema name (for example after keywork FROM) * [ ] - add description in autocompletion list for schema names - schema, for table names - table and so * [ ] - autocompletion must initialize on opening of interpeter (not only after execution of sql) * [ ] - update autocompletion schemas only after execute update sql, not after every sql ??? * [ ] - new option for postgresql interpreter: postgresql.completer.schema.filter. Filter schema names loaded into autocompletion (no more garbage schema names). ### What is the Jira issue? * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/ * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. [ZEPPELIN-533] ### How should this be tested? Outline the steps to test the PR here. ### Screenshots (if appropriate) https://issues.apache.org/jira/secure/attachment/12845228/auto1.JPG https://issues.apache.org/jira/secure/attachment/12845229/auto2.JPG https://issues.apache.org/jira/secure/attachment/12845230/auto3.JPG ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes You can merge this pull request into a Git repository by running: $ git pull https://github.com/sotnich/zeppelin jdbc-1876 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1886.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 #1886 ---- commit e9fde84884226f600455cdbd035d9a59b538300c Author: Sotnichenko Sergey <s.sotniche...@tinkoff.ru> Date: 2017-01-11T11:40:46Z [ZEPPELIN-1876] improved comptetion with schema/table/column separation + sqlcompleter tests ---- --- 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. ---